(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
map <C-f> scrollFullPageDown | |
map <C-b> scrollFullPageUp | |
map <C-e> scrollDown | |
map <C-y> scrollUp |
#!/bin/bash | |
test `xcode-select -p` || xcode-select --install | |
test `which brew` || ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
brew install caskroom/cask/brew-cask | |
brew cask install google-chrome | |
brew cask install macdown |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
#!/usr/bin/env bash | |
# Time-stamp: <2014-07-31 13:31:43 (ryanc)> | |
# | |
# Description: Mirror traffic between two interfaces using Linux's | |
# traffic control subsystem (tc) | |
trap cleanup EXIT | |
CLEANUP=1 | |
SRC_IFACE=$1 |
<VirtualHost *> | |
ServerName example.com | |
WSGIDaemonProcess www user=max group=max threads=5 | |
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi | |
<Directory /home/max/Projekte/flask-upload> | |
WSGIProcessGroup www | |
WSGIApplicationGroup %{GLOBAL} | |
Order deny,allow |
# Source: https://gist.github.com/v-yarotsky/2157908 | |
# Usage: | |
# - Prefix is set to Ctrl-o (make sure you remapped Caps Lock to Ctrl) | |
# - All prefixed with Ctrl-o | |
# - Last used window: / | |
# - Last used pane: ; | |
# - Vertical split: v | |
# - Horizontal split: s | |
### KEYS ### |
#!/usr/bin/python | |
# demo from here: http://pymotw.com/2/urllib2/index.html#uploading-files | |
import itertools | |
import mimetools | |
import mimetypes | |
from cStringIO import StringIO | |
import urllib | |
import urllib2 |
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
#!/usr/bin/env python | |
from __future__ import print_function | |
import base64 | |
import sys | |
PEM = ("""-----BEGIN RSA PRIVATE KEY----- | |
MIIEogIBAAKCAQEAgK1Q6Ydi8UUheJLvnTYJE65NOZtAtjDdDSxS+6b4x9EakjIylljSzs5uLEJn |