NGINX CLI Cheatsheet

This cheatsheet is just for the commands you can run for Nginx and is nothing to do with the configuration files. Test The Configuration If you make a change to your configuration and want to check that everything is okay before having the changes take effect, then use this command.…

Read this article

SVN Cheatsheet

Partial Merge Sometimes branches get way out of date and merging all updates from trunk causes way too many conflicts to handle at once. In this case you may want to merge updates from trunk in stages which are easier to handle. The command below will only sync updates from…

Read this article

Javascript Cheatsheet

Check if Element With ID Exists With jquery... if($("#" + name).length == 0) { //it doesn't exist } Get Whether Checkbox Ticked Use jquery .is(':checked') Execute Script When Document Loaded $(document).ready() You can chain these multiple times and all will execute. E.g. $(document).ready(function(){ doSomething(); }) $(document).ready(function(…

Read this article

Linux CLI Cheatsheet

Below are some short snippets of code to help you perform day-to-day tasks in Linux. If you can't find what you are looking for, make sure to look at the BASH cheatsheet. Related Posts BASH cheatsheet Docker CLI Cheatsheet Easily Parallelize Commands in Linux (Multiprocessing) Get Time Taken For Command…

Read this article

KVM Cheatsheet

List Running Virtual Machines virsh list List All Virtual Machines virsh list --all Managing Guest State Shutdown Guest virsh shutdown $VM_ID_OR_NAME Start Guest virsh start $VM_ID_OR_NAME Reboot Guest virsh reboot $VM_ID_OR_NAME Destroy a Guest This command is an ungraceful shutdown, much…

Read this article

ZFS Cheatsheet

Pools List Pools sudo zpool list Create a ZFS volume/pool on a single disk: zpool create vol0 /dev/sd[x] Your pool will automatically be mounted at /[pool name]. Refer here for details of creating other pool types across multiple disks, such as RAID 1, 10, 5 etc. Delete…

Read this article

Git Cheatsheet

Below is a cheatsheet for Git so we don't become like the guys in this comic: Image courtesy of xkcd Commands Similar Commands To SVN These commands just need to be prepended with git, instead of svn: commit add diff log status Differences mv instead of move rm instead of…

Read this article

LVM Cheatsheet

As with all my cheatsheets, they are works in progress and will be continuously added to whenever I find a command that I need that it does not list. If there is something that you are looking for that is not listed, please visit the references. If you find a…

Read this article

Docker CLI Cheatsheet

This is just a cheatsheet of commands you may wish to execute to manage your docker images/containers. Docker - Get Latest Built Image ID docker images -q | sed -n 2p Remove stopped Containers docker rm $(docker ps -a -q) You may get the message Error: failed to remove one…

Read this article

BTRFS Cheatsheet

BTRFS (sometimes pronounced butter-fs) is a filesystem developed by Oracle (maintainers of Virtualbox and Java). It is a copy-on-write (CoW) filesystem, which allows one to implement advanced features such as snapshotting and bitrot detection/ removal. The best reason to use BTRFS is that it allows one to add additional drives…

Read this article