This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Clear out old, inactive versions of software | |
# installed by Homebrew. | |
# Created by Colin and listed on http://www.nonsenseby.me/blog/2014/01/12/remove-old-versions-in-homebrew/ | |
# | |
set -o noglob | |
# Some brew settings. | |
readonly BREW_CMD=$( which brew ) | |
readonly BREW_AWK="/tmp/brew.$$.awk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Public Javascript Object | |
*/ | |
function Shape(sides, fillColor, strokeColor) { | |
// Public properties | |
this.sides = sides; | |
this.fillColor = fillColor; | |
this.strokeColor = strokeColor; | |
// Private properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of creating a Name Spaced object in javascript inspired by: | |
// http://stackoverflow.com/questions/881515/how-do-i-declare-a-namespace-in-javascript | |
// Jaco Pretorius: http://stackoverflow.com/users/121531/jaco-pretorius | |
(function( skillet, $, undefined ) { | |
//Private Property | |
var isHot = true; | |
//Public Property | |
skillet.ingredient = "Bacon Strips"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="application/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
</head> | |
<body> | |
<script type="application/javascript"> | |
(function( VT, $, undefined ) { | |
VT.whoami = "VT"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.each( [ "put", "patch", "delete" ], function( i, method ) { | |
jQuery[ method ] = function( url, data, callback, type ) { | |
// Shift arguments if data argument was omitted | |
if ( jQuery.isFunction( data ) ) { | |
type = type || callback; | |
callback = data; | |
data = undefined; | |
} | |
// The url can be an options object (which then must have .url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
APP_NAME=$1 | |
PORT=$2 | |
: ${PORT:=4000} | |
echo "Creating a Phoenix app called $APP_NAME in docker with the port $PORT." | |
docker run -it --rm -v "$PWD":/code -w /phoenix stevobengtson/vt-phoenix-docker mix phoenix.new /code/$APP_NAME | |
cd $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this file in ~/.pryrc | |
# vim FTW - you can use 'mate' or whichever your prefer | |
Pry.config.editor = 'vim' | |
Pry.config.hooks.add_hook :after_session, :say_bye do | |
puts "bye-bye" if Pry.active_sessions == 1 | |
end | |
# Prompt with ruby version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
UNAMEOUT="$(uname -s)" | |
# Verify operating system is supported... | |
case "${UNAMEOUT}" in | |
Linux*) MACHINE=linux;; | |
Darwin*) MACHINE=mac;; | |
*) MACHINE="UNKNOWN" | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "tmux-256color" | |
set -ag terminal-overrides ",xterm-256color:RGB" | |
set -g prefix C-a | |
unbind C-b | |
bind-key C-a send-prefix | |
unbind % | |
bind | split-window -h |