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
apt-get install python-software-properties | |
add-apt-repository ppa:keithw/mosh | |
apt-get update && apt-get upgrade -y | |
apt-get install -y \ | |
python-dev \ | |
python3-dev \ | |
build-essential \ | |
git \ |
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
# | |
# A simple theme that displays relevant, contextual information. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
# Screenshots: | |
# http://i.imgur.com/nrGV6pg.png | |
# |
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
const oneBigFunction = () => { | |
const add = (x, y) => x + y | |
const subtract = (x, y) => x - y | |
const multiply = (x, y) => x * y | |
const divide = (x, y) => x / y | |
return divide(add(multiply(8, 1), 2), subtract(3, 1)) | |
} | |
// or |
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
class InventoryObject { | |
/** | |
* @param {string} name | |
* @param {number} price | |
*/ | |
constructor(name, price) { | |
this.name = name; | |
this.price = price; | |
} |
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
// Don't | |
function handler(event, context) { | |
const s3 = new AWS.S3() | |
return s3.upload({}).promise() | |
} | |
// Better - Init variables outside the handler | |
const s3 = new AWS.S3() |
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
// Main API Lambda | |
async function (event) { | |
let input | |
let context | |
let response | |
try { | |
// input is simply the relevant input (not the whole | |
// AWS Lambda event which contains lots of unnecessary data) |
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
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
source /usr/local/share/zsh-history-substring-search/zsh-history-substring-search.zsh | |
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh | |
bindkey '^[[A' history-substring-search-up | |
bindkey '^[[B' history-substring-search-down | |
# Aliases | |
alias wget='wget -c' | |
alias c='clear' |
OlderNewer