git stash save --keep-index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -k -d1 * | sort -nr | cut -f2 | xargs -d '\n' du -sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get a patch from a git branch | |
============================= | |
Create a branch, or go to the branch in which we want to modify code | |
# git checkout -b fix_empty_poster | |
Make your changes, and see your commits in log | |
# git log --pretty=oneline -3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dump disk into zip file | |
======================= | |
# /bin/dd if="$DEVICE" conv=sync,noerror bs=64K | /bin/gzip -c > "$FILE" | |
Restore from zip file | |
======================= | |
# gunzip -c "$FILE" | dd of="$DEVICE" conv=sync,noerror bs=64K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable | |
sudo apt-get update | |
sudo apt-get -traring install nemo | |
sudo nano /etc/apt/preferences # Add this lines at the end of the file | |
Package: * | |
Pin: origin ppa.launchpad.net | |
Pin-Priority: 700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decode | |
====== | |
openssl enc -base64 -d <<< SGVsbG8sIFdvcmxkIQo= | |
Encode | |
====== | |
openssl enc -base64 <<< 'Hello, World!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date('d/m/Y H:i:s') => 31/12/1970 10:45:56 | |
date('d/m/Y') => 31/12/1970 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
set -l fish_custom_color_user purple | |
set -l fish_custom_color_host red | |
set -l fish_custom_color_normal yellow | |
set -l fish_custom_color_cwd yellow | |
# User | |
set_color $fish_custom_color_user | |
echo -n (whoami) |
https://edwardsamuel.wordpress.com/2016/04/28/set-up-postgresql-9-5-master-slave-replication-using-repmgr/ https://github.com/2ndQuadrant/repmgr
http://www.rassoc.com/gregr/weblog/2013/02/16/zero-to-postgresql-streaming-replication-in-10-mins/ https://thedulinreport.com/2015/01/31/configuring-master-slave-replication-with-postgresql/ https://www.howtoforge.com/tutorial/postgresql-replication-on-ubuntu-15-04/ https://www.postgresql.org/docs/9.5/static/hot-standby.html https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps http://packages.ubuntu.com/xenial/postgresql-9.5-repmgr
OlderNewer