Skip to content

Instantly share code, notes, and snippets.


Kelli Shaver kellishaver

View GitHub Profile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "rr2014"
config.vm.box_url = ""
kellishaver / Automated Client Side Init
Last active Aug 29, 2015
Automated init and build scripts for client-side projects
View Automated Client Side Init
Sometimes you want to keep it simple and create just the basics that you need to start from a clean slate.
I keep ``, the `package.json` file and the `client-side-init.rb` file in `~/builerplates`. Then I added the alias to my `bash_profile`.
To start a new project I just run:
client-side-init my-project-name
Then I can just `cd` into `~/www/my-project-name` run `grunt` and get to work.
kellishaver / gist:bb8b3a2473b54860f568
Created Sep 21, 2014
Customize your command prompt with useful Git info
View gist:bb8b3a2473b54860f568
export TERM=xterm-256color
MAGENTA=$(tput setaf 9)
ORANGE=$(tput setaf 172)
YELLOW=$(tput setaf 190)
PURPLE=$(tput setaf 141)
BOLD=$(tput bold)
RESET=$(tput sgr0)
export MAGENTA
View reset
* {
::-moz-selection {
kellishaver / slideshow
Created Feb 17, 2009
A very simple jQuery slideshow.
View slideshow
// -----------------------------------------------------------------
// A very simple jQuery slideshow. It requires a little more work
// on the part of the user, but this keeps the transition code tiny.
// -----------------------------------------------------------------
// CSS
// -----------------------------------------------------------------
#slideshow { width:200px; height:200px; }
.hidden { display:none; }
// -----------------------------------------------------------------
kellishaver / VPS setup
Created Jul 5, 2009
basic rails stack setup - OUTDATED
View VPS setup
apt-get update
apt-get install build-essential ruby ruby1.8-dev wget vim apache2 libopenssl-ruby apache2-prefork-dev rdoc git-core
apt-get install sqlite3 libsqlite3-dev
apt-get install imagemagick
kellishaver / get inverse hex
Created Dec 3, 2009
feed it a hex code and it returns the inverse
View get inverse hex
function invert_color(color) {
color = color.replace('#', '');
r = color.substr(0,2);
g = color.substr(2,2);
b = color.substr(4,2);
inverted_r = 255 - parseInt(r,16);
inverted_g = 255 - parseInt(g,16);
inverted_b = 255 - parseInt(b,16);
kellishaver / dropdown_menu.js
Created Jan 4, 2010
dead-simple dropdown menus with jquery
View dropdown_menu.js
jQuery.fn.dropdown = function() {
var menu = $(this);
var ddm = 0;
menu.find('li ul').hide();
menu.find('li').bind('mouseover', function() {
ddm = $(this).find('ul li').unbind('mouseout');
ddm = $(this).find('ul').stop().show();
}).bind('mouseout', function() {
if(ddm) {
kellishaver / flash_notice.css
Created Feb 13, 2010
javascript/css for floating flash notice
View flash_notice.css
#flash_notice {
border:1px solid #060;
font-family:arial, helvetica, sans-serif;
kellishaver / tab_shortcuts.html
Created Feb 21, 2010
Demo implementation of tabbed nav with keyboard shortcuts
View tab_shortcuts.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" dir="ltr" lang="en-US">
<title>Tabs With Keyboard Shortcuts</title>
<style type="text/css">
body { background:#fff; font-family:arial, helvetica, sans-serif; color:#000; font-size:10pt; }
#container { width:450px; border:1px solid #3b3b3b; height:200px; }
#tabs { margin:0; padding:0; background:#aaa; height:35px; border-bottom:1px solid #3b3b3b; }
#tabs li { list-style:none; margin:0; padding:0; display:inline; }
#tabs li a { color:#999; font-weight:bold; text-decoration:none; height:25px; line-height:25px; margin-top:5px; border-bottom:1px solid #3b3b3b; padding:0 10px; margin:10px 0 0 10px; float:left; background:#ededed; border-right:2px solid #3b3b3b; outline:none; }