Skip to content

Instantly share code, notes, and snippets.

View Effective_Engineer.md

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
omarzina / ansible-summary.md
Created Dec 20, 2017 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick
View ansible-summary.md

An Ansible summary

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

Configuration file

intro_configuration.html

First one found from of

@omarzina
omarzina / convert.sh
Created Feb 24, 2017 — forked from rhardih/convert.sh
Recursively find and convert .epub to .mobi using calibres ebook-convert (in parallel)
View convert.sh
find . -name "*.epub" -exec sh -c 'ebook-convert "{}" "$(dirname "{}")/$(basename -s .epub "{}").mobi" &' \;
@omarzina
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
omarzina / tmux.md
Created May 28, 2016 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

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
omarzina / cheatsheet-git.sh
Created Dec 7, 2015 — forked from raineorshine/cheatsheet-git.sh
Cheatsheet: git commands
View cheatsheet-git.sh
# 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
omarzina / postgres-cheatsheet.md
Created Dec 1, 2015 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

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 --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --url=jdbc:sqlserver@localhost:1324:db --username=sa --password= diff --referenceUrl=jdbc:sqlserver@localhost:1324:refdb --referenceUsername=user --referencePassword=password
@omarzina
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"