Plex is a media server which aggregates your media and allows you to access it on your home network. Installing the server is relatively simple… Installing it with Docker is even simpler. Docker also makes it easy to define a single configuration which is reusable across environments.
I’m working off a Ubuntu installation, since that is where I’m setting up my home media centre, but once docker is installed, getting Plex going should be nearly identical in any OS.
Repacking an unpacked JAR is a little frustrating because of the folder structure
When unpacking with:
jar xvf JAR_NAME.jar
you get a
To repack the JAR:
remove old jar
get inside the folder
pack the jar referencing the parent folder
jar cf ../JAR_NAME.jar *
and you will end up with the JAR_NAME.jar in the parent folder, where the original was unpacked from, without the first folder level you would get if you had packed the folder itself.
In the simplest terms,
git pull does a
git fetch followed by a
You can do a
git fetch at any time to update your remote-tracking branches under
This operation never changes any of your own local branches under
refs/heads, and is safe to do without changing your working copy. I have even heard of people running
git fetchperiodically in a cron job in the background (although I wouldn’t recommend doing this).
git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.
Git documentation: git pull
The cleanup (
brew cleanup) command will remove outdated installed package versions. To affect a particular package/formula, you may supply a formula name like so:
brew cleanup $FORMULA. To simulate cleanup, i.e. see what would be removed, you may use the
brew cleanup -n.
Content or value based charging is to charge an end-user based on the variable value of a used service rather than on time used or flat rates. This can be used, for example, when downloading music video clips. Different contents can be charged at different rates, i.e. music contents 30 TK/minute, news contents 20 TK/minute etc.
Subscription charging is applied for regular subscription based services. Users can subscribe for a service for a specific modality. Here Subscription Based Modality means users can subscribe for a service monthly/bi weekly/weekly/daily and charge accordingly. Different modalities have different charging rates. When the user is subscribed to a service, the system treats the user as a registered user and sends service specific content to that user and the user can get the service.
LT2P IPSEC vpn works simple and easily with iOS/Android and Windows 10. Unfortunately as many people likely know (after a few google searches it seems) the client for this is pretty crap in Ubuntu 16.04.
Our setup uses a shared PSK, and a username and password.
I’ve tried a bunch of the quick setup guides, but many were for older versions of Ubuntu and thus didn’t work very well. Finally I stumbled across this guide: https://gist.github.com/psanford/42c550a1a6ad3cb70b13e4aaa94ddb1c
which was used to connect with a meraki router over vpn. There were some minor tweaks in my case, but I managed to get it work.
To perform a global search and replace in vim, use the search and replace command in command mode:
% is a shortcut that tells vi to search all lines of the file for
search_string and change it to
replacement_string. The global (
g) flag at the end of the command tells vi to continue searching for other occurrences of
search_string. To confirm each replacement, add the confirm (
c) flag after the global flag.
I’m using log4j’s DailyRollingFileAppender which would create a new log file everyday. Each file’s size is around 100 to 200MB, and I see the log files folder is growing bigger and bigger every day.
My solution to them is to compress everyday’s log into gzip, gz or perhaps into zip file. Basically, im using one of log4j’s companion.
Compress an Entire Directory or a Single File
Use the following command to compress an entire directory or a single file on Linux. It’ll also compress every other directory inside a directory you specify–in other words, it works recursively.
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Here’s what those switches actually mean:
- -c: Create an archive.
- -z: Compress the archive with gzip.
- -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
- -f: Allows you to specify the filename of the archive.
Set up your own IPsec VPN server in just a few minutes, with both IPsec/L2TP and Cisco IPsec on Ubuntu, Debian and CentOS.