Skip to content

Instantly share code, notes, and snippets.

View NTICompass's full-sized avatar

Eric Siegel NTICompass

View GitHub Profile
@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 / .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 / moment.phpDateFormat.js
Last active May 25, 2018 02:15
Use PHP's date() formats in moment.js
(function(m){
/*
* PHP => moment.js
*
* http://www.php.net/manual/en/function.date.php
* http://momentjs.com/docs/#/displaying/format/
*/
var formatMap = {
d: 'DD',
D: 'ddd',
@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 / 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}"
@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 / QRLogo.php
Created October 13, 2011 03:10
QR Code + Logo Generator
<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;