Skip to content

Instantly share code, notes, and snippets.

View NTICompass's full-sized avatar

Eric Siegel NTICompass

View GitHub Profile
@NTICompass
NTICompass / ati-install.sh
Last active August 29, 2015 13:56
fglrx-12.4 for Linux 3.2
#!/bin/bash
# Get the directory this script is in
AMD=`pwd`
# Ask AMD/ATI for the 12.4 drivers
if [ ! -f "amd-driver-installer-12-4-x86.x86_64.run" ]; then
wget --referer='http://support.amd.com' http://www2.ati.com/drivers/linux/amd-driver-installer-12-4-x86.x86_64.run
chmod +x amd-driver-installer-12-4-x86.x86_64.run
fi
@NTICompass
NTICompass / .zshrc
Last active August 29, 2015 14:19
So I can easily get my zsh config file on new machines
# Initialize Autocompletion and Autocorrection
autoload -U compinit promptinit
compinit
promptinit
#prompt redhat
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
zstyle ':completion::complete:*' use-cache 1
setopt correctall
@NTICompass
NTICompass / .tmux.conf
Created April 17, 2015 12:54
My tmux config
set -g prefix C-a
unbind %
unbind '"'
bind | split-window -h
bind - split-window -v
@NTICompass
NTICompass / air-launcher
Created August 31, 2012 14:33
Adobe Air launcher for linux
#!/bin/sh
/opt/AdobeAir/bin/adl -nodebug "/opt/airapps/$1/META-INF/AIR/application.xml" "/opt/airapps/$1/" "${@:2}"

Keybase proof

I hereby claim:

  • I am nticompass on github.
  • I am nticompass (https://keybase.io/nticompass) on keybase.
  • I have a public key whose fingerprint is 18B6 B28A F7E4 CC3D 5D21 0CE5 B8AD DB98 7263 85E8

To claim this, I am signing this object:

@NTICompass
NTICompass / parseQuery.js
Last active March 3, 2016 17:07
Parse GET query string in JavaScript
function parseQuery(str){
var ret = {};
str.split("&").forEach(function(value){
var data = value.split('='),
name = decodeURIComponent(data.shift()),
val = decodeURIComponent(data.join("=")).replace('+', ' '),
nameVal = name.match(/(.*)\[(.*)\]/);
if(nameVal === null){
ret[name] = val;
@NTICompass
NTICompass / ModelM.sc
Last active March 8, 2016 16:07
Soarer Converter - Model M Remap
ifset set3
# Model M 1394100
remapblock
# Fix the symbol keys
#LEFT_BRACE UNASSIGNED # cents key
# I want to macro the cents key, so I need an unused keycode
LEFT_BRACE AUX1
RIGHT_BRACE BACKSLASH # | \ key
EUROPE_1 RIGHT_BRACE # > < key
@NTICompass
NTICompass / _emergeTools
Created July 17, 2016 02:15
Gentoo Portage shortcuts script (and ZSH completion file)
#compdef emergeTools
# This is a zsh autocomplete file for NTICompass' "emergeTools" script
_emergeTools(){
local -a commands
commands=(
'update: Update emerge''s database'
'upgrade: List available package updates'
'safe-upgrade: Run upgrade WITHOUT --keep-going'
'check: [deprecated] Run revdep-rebuild'
@NTICompass
NTICompass / tron.sh
Last active September 17, 2016 18:39
SSH magic tricks
#!/bin/bash
# Should we connect via IPv4 or IPv6?
if ping -c 1 ipv6.google.com &> /dev/null
then
SERVER="tron6"
else
SERVER="tron"
fi
@NTICompass
NTICompass / Dockerfile
Created January 27, 2016 22:10
Run headless wkhtmltopdf inside Docker container
# wkhtmltopdf from: http://wkhtmltopdf.org/downloads.html
FROM centos:7
MAINTAINER Eric Siegel <nticompass@gmail.com>
# Upgrade packages & repo
RUN yum -y update
# wkhtmltopdf's dependencies
RUN yum -y install zlib fontconfig freetype libX11 libXext libXrender
# Download x64 static build of wkhtmltox (with patched QT)