Essential Apps
- SublimeText
- Skype
- Chrome
- Firefox
- Alfred
- iTerm
- Clipmenu
- SizeUp
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' |
// 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) |
// 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() |
class InventoryObject { | |
/** | |
* @param {string} name | |
* @param {number} price | |
*/ | |
constructor(name, price) { | |
this.name = name; | |
this.price = price; | |
} |
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 |
# | |
# A simple theme that displays relevant, contextual information. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
# Screenshots: | |
# http://i.imgur.com/nrGV6pg.png | |
# |
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 \ |
set -e | |
set -x | |
sudo aptitude update | |
sudo aptitude upgrade -y | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2) | |
do | |
sudo npm -g install "$package" |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%} git:" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg[green]%} hg:" | |
ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_HG_PROMPT_DIRTY=" %{$fg[red]%}⚡" | |
ZSH_THEME_HG_PROMPT_CLEAN="" |
Essential Apps