Skip to content

Instantly share code, notes, and snippets.

View kingbin's full-sized avatar
🎯
Focusing

Chris Blazek kingbin

🎯
Focusing
View GitHub Profile
@kingbin
kingbin / gist:10283683
Created April 9, 2014 15:33
tmuxinator window # fix on Ubuntu 12.04
sudo apt-get install python-software-properties software-properties-common
sudo add-apt-repository ppa:pi-rho/dev
sudo apt-get update
sudo apt-cache show tmux
sudo apt-get install tmux
tmux -V
mux iPadServices
rvm list known - list most recent / imporant releases rvm supports with source
rvm list remote [rubies|rbx|jruby] - list available binaries for your platforms
rvm install 2.1 --latest-binary - install latest available 2.1 binary (before I have time to compile from latest source)
rvm install rbx-weekly --binary - detect latest available weekly build of rbx
update those gems dude
gem update `gem list | cut -d ' ' -f 1`
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@kingbin
kingbin / Invert Mouse
Created February 26, 2015 17:15
invert mouse for natural scroll
PowerShell (admin):
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
@kingbin
kingbin / gist:af836ccea1100cd89cc9
Last active August 29, 2015 14:17
NPM install script for deploying
#!/bin/bash
red='\033[0;31m'
green='\033[0;32m'
NC='\033[0m' # No Color
set -o errexit # Exit on error
command -v pdftk >/dev/null 2>&1 || { echo -e >&2 "${red}I require pdftk but it's not installed. Aborting.${NC}"; exit 1; }
#DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
@kingbin
kingbin / gist:7bdccbc7562e8242362e
Created March 17, 2015 22:01
Run command as another user
sudo -H -u thebauce bash -c 'echo "I am $USER, with uid $UID"'

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kingbin
kingbin / gist:87fb70e3aba6230a573b
Created April 13, 2015 15:57
Git Config Playground
[user]
name = Chris Blazek
email = [email protected]
[color]
status = auto
branch = auto
diff = auto
ui = auto
### PATH for MySQL
##export PATH=/usr/local/mysql/bin:$PATH
##
### PATH for MongoDB
##export PATH=/Applications/mongodb-osx-x86_64-2.0.0/bin:$PATH
#
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
# Add home dir scripts to the path
SELECT
K_Table = FK.TABLE_NAME,
FK_Column = CU.COLUMN_NAME,
PK_Table = PK.TABLE_NAME,
PK_Column = PT.COLUMN_NAME,
Constraint_Name = C.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME