-
Create a file to store our credentials:
sudo vim /etc/postfix/sasl_passwd
-
Add something like this:
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
# Inspirations: | |
# http://mutelight.org/practical-tmux | |
# http://zanshin.net/2013/09/05/my-tmux-configuration/ | |
# http://files.floriancrouzat.net/dotfiles/.tmux.conf | |
# http://stackoverflow.com/questions/9628435/tmux-status-bar-configuration | |
# https://github.com/Lokaltog/powerline | |
# https://github.com/remiprev/teamocil | |
# http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux | |
# http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/ | |
# |
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
B A S H C H E A T S H E E T | |
to page output forward (only): command filename | more | |
to page output forward & back: command filename | less | |
to print a dataset: lp datasetname (-d printerid) (-o landscape) | |
USE OF QUOTATION MARKS | |
echo "$varname" = echo The value of \$varname is \"$varname\" | |
= echo "The value of \$varname is \"$varname\"." | |
$fred='Four spaces between these words.' |
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
" _ _ " | |
" _ /|| . . ||\ _ " | |
" ( } \||D ' ' ' C||/ { % " | |
" | /\__,=_[_] ' . . ' [_]_=,__/\ |" | |
" |_\_ |----| |----| _/_|" | |
" | |/ | | | | \| |" | |
" | /_ | | | | _\ |" | |
It is all fun and games until someone gets hacked! |
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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 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
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
# cat paths | |
/_cat/allocation | |
/_cat/shards | |
/_cat/shards/{index} | |
/_cat/master | |
/_cat/nodes | |
/_cat/indices | |
/_cat/indices/{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
/** | |
* Test for nested JavaScript object key | |
* | |
* @memberof Object.prototype | |
* @param {...String} key string(s) | |
* @return {Boolean} has nested key | |
* | |
* [http://stackoverflow.com/questions/2631001/javascript-test-for-existence-of-nested-object-key] | |
*/ | |
Object.prototype.checkNested = function() { |
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
/** | |
* Access nested JavaScript object value from string key | |
* | |
* @memberof Object.prototype | |
* @param s {String} property string | |
* @return {String} value for property string | |
* | |
* [http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key] | |
*/ | |
Object.prototype.byString = function(s) { |
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
#!/usr/bin/env python | |
''' | |
This script will attempt to open your webbrowser, | |
perform OAuth 2.0 authentication and print your access token. | |
To install dependencies from PyPI: | |
$ pip install oauth2client | |
Then run this script: |
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
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |