Skip to content

Instantly share code, notes, and snippets.


FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

omarzina /
Created Dec 20, 2017 — forked from andreicristianpetcu/
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file


First one found from of

omarzina /
Created Feb 24, 2017 — forked from rhardih/
Recursively find and convert .epub to .mobi using calibres ebook-convert (in parallel)
find . -name "*.epub" -exec sh -c 'ebook-convert "{}" "$(dirname "{}")/$(basename -s .epub "{}").mobi" &' \;
omarzina / gist:5e53035e564a8005552aa3fc1af6b557
Created Jul 22, 2016
create bootable usb drive in linux
View gist:5e53035e564a8005552aa3fc1af6b557
fdisk -l
umount sdx_
dd if=/path/to/file.iso of=/dev/sdx bs=4M
omarzina /
Created May 28, 2016 — forked from andreyvit/
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
View gist:d5224d81f7c38eee6f1c
class Solution {
public int solution(int[] A) {
int N = A.length;
double sum = 0;
for (double i : A) {
sum += i;
if (N == 1) return 0;
double left = 0;
omarzina /
Created Dec 7, 2015 — forked from raineorshine/
Cheatsheet: git commands
# adding and committing
git add -A # stages All
git add . # stages new and modified, without deleted
git add -u # stages modified and deleted, without new
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed.
git commit --amend --no-edit # Do so without having to edit the commit message.
# remotes - pushing, pulling, and tracking
git fetch # gets remote objects and refs. Needed if new branches were added on the remote.
git remote -v # Lists all remotes (verbose)
omarzina /
Created Dec 1, 2015 — forked from Kartones/
PostgreSQL command line cheatsheet

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

  • \q: Quit/Exit
  • \c __database__: Connect to a database
View liquibase diff sql server
liquibase --url=jdbc:sqlserver@localhost:1324:db --username=sa --password= diff --referenceUrl=jdbc:sqlserver@localhost:1324:refdb --referenceUsername=user --referencePassword=password
omarzina / mercurial log template
Created Jul 7, 2015
Template compacto para log de mercurial
View mercurial log template
hg log -l 5 --template "{branch} {date|shortdate} {rev}|{node} {user} stats:{diffstat} {desc}\n"