Skip to content

Instantly share code, notes, and snippets.

@yitznewton
yitznewton / gist:3172174
Created July 24, 2012 19:40
Vitals rap
i need to
understand the capabilities
of the PRS
it is causing mass confusion
and an awful lot of stress
i was working on a site
for the BCBSA;
the requirements have changed,
gotta throw my code away
@yitznewton
yitznewton / .vimrc
Created October 14, 2012 13:18
Windows vimrc
set shiftwidth=4
set tabstop=4
set hidden
set autoindent
set fileformats=unix,dos
set cc=76
set backspace=indent,eol,start
syntax on
map w <Plug>CamelCaseMotion_w
yschaffer@yschaffer-mint-1 ~ $ cat /usr/local/bin/monitor_detect
#!/bin/sh
MONITOR_CONNECTED=`xrandr | grep HDMI3\ connected`
if [ $? -eq 0 ]; then
xrandr --output HDMI3 --auto --left-of LVDS1
/usr/bin/setxkbmap -option 'ctrl:nocaps'
else
xrandr --auto
@yitznewton
yitznewton / Hamli.sh
Created November 6, 2012 21:46
Hamli - recursively process .haml files to .html.php
#!/bin/bash
for FILE in `find $1 -name '*.haml'` ; do
BASENAME=${FILE:0: -5}
haml $FILE > $BASENAME.html.php
done
function git_checkout
{
REF=$(git symbolic-ref HEAD 2> /dev/null)
HASH=$(git rev-parse --short HEAD 2> /dev/null) || return
if [ -n "$REF" ] ; then echo "("${REF#refs/heads/}") " ;
elif [ -n "$HASH" ] ; then echo "("${HASH}") " ;
fi
}
#!/bin/bash
function update_branch {
cp -R base "features/$2"
cd "features/$2"
git fetch
git checkout $1
git pull
git submodule update --init
mkdir -p app/resources/tmp/{cache/templates,logs}
@yitznewton
yitznewton / Default.ini
Created April 11, 2013 03:16
Config for Compiz
[core]
s0_active_plugins = core;composite;opengl;decor;resize;compiztoolbox;scale;grid;staticswitcher;move;
[scale]
s0_initiate_edge = TopRight
s0_overlay_icon = 1
s0_initiate_key = Scroll_Lock
[switcher]
s0_icon_only = true
@yitznewton
yitznewton / google-maps.html
Created May 26, 2013 04:06
Google Maps integration example
<script>
var MDXMA = {};
/**
* Creates a Google Map using the Maps API v3
*
* Assumptions in DOM
* * exactly one target element
* * if class 'lookup' is set and sources collection has one element,
* will perform a lookup using the Google Maps Geocoder service
"HPD700234108","JOY","HANNAH","19560202","T"
"HPD984254101","STANLEY","PAUL","19770712","T"
"KEA700320010","LANDRY","CHUCK","19810101","T"
"Knee ACL Repair by Arthroscopy",6500
"Lower Limb, MRI Lower Limb",775
@yitznewton
yitznewton / style.css
Last active December 24, 2015 19:09
Modified css for Grayscales WP theme
/*
Theme Name: Grayscales
Description: The name of the game is Grayscale. The anti-responsive, anti-flashy, anti bells and whistles theme. No popular or current styles around here ;). For those looking to take a trip back to simpler times in black and white with a good ol' fashioned fixed-width (that's pixels baby) design that looks the exact same across all devices, this is the theme for you. Grayscale is a minimalist theme and void of some common design standards such as dropdown menus as a conscious design choice with "the simpler, the better" in mind. If you need a theme stocked with such common features out-of-the-box, this theme will not suit your needs. Thank you. - Official Support Forum: bryanhadaway.com/forum/projects
Author: Bryan Hadaway
Author URI: http://calmestghost.com/
Version: 1.3
Tags: black, gray, silver, white, light, two-columns, right-sidebar, fixed-width, custom-menu, featured-images, microformats, sticky-post, threaded-comments, translation-ready
License: GNU General Public License
Li