Skip to content

Instantly share code, notes, and snippets.

View keithhamilton's full-sized avatar

Keith Hamilton keithhamilton

View GitHub Profile
@keithhamilton
keithhamilton / OS X Virtualbox + Vagrant
Last active August 30, 2016 18:35
Install Virtualbox and Vagrant on OS X
#!/bin/bash
# make sure brew and wget are installed
BREW=`which brew | sed -e 's/\// /g' | awk '{print $NF}'`
if [ -z $BREW ]; then
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
WGET=`which wget | sed -e 's/\// /g' | awk '{print $NF}'`
if [ -z $WGET ]; then
brew install wget
fi
@keithhamilton
keithhamilton / OS X 10.9 Dev Tool Installer
Last active August 4, 2016 13:53
Install script for many of the tools I use in my dev environment. Doesn't install key files or license codes, just the apps. It's a step in the right direction for getting a fresh system up quickly.
#!/bin/bash
################
# OS X Dev Tool Installer
################
#
# WHAT IS INSTALLED
# Homebrew
# wget
# python 2.7.6
# git
@keithhamilton
keithhamilton / Composite Client build tools
Last active August 29, 2015 13:57
Installs build tools for Composite client framework
#!/bin/bash
GIT=`which git`
if [ -z $GIT ]; then
BREW=`which brew`
if [ -z $BREW ]; then
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
fi
# install git
wget http://dd1.aquafold.com/download/v14.0.0/osx/ads-osx-14.0.12.tar.gz -O /tmp/ads-osx-14.0.12.tar.gz
sudo tar xzf /tmp/ads-osx-14.0.12.tar.gz -C /Applications/
rm -rf /tmp/ads-osx-14.0.12.tar.gz
@keithhamilton
keithhamilton / gist:584bdcf39aa9b75a2f46
Created July 3, 2014 04:02
CSV file used to track the working times.
Day,5:00 AM,5:15 AM,5:30 AM,5:45 AM,6:00 AM,6:15 AM,6:30 AM,6:45 AM,7:00 AM,7:15 AM,7:30 AM,7:45 AM,8:00 AM,8:15 AM,8:30 AM,8:45 AM,9:00 AM,9:15 AM,9:30 AM,9:45 AM,10:00 AM,10:15 AM,10:30 AM,10:45 AM,11:00 AM,11:15 AM,11:30 AM,11:45 AM,12:00 PM,12:15 PM,12:30 PM,12:45 PM,1:00 PM,1:15 PM,1:30 PM,1:45 PM,2:00 PM,2:15 PM,2:30 PM,2:45 PM,3:00 PM,3:15 PM,3:30 PM,3:45 PM,4:00 PM,4:15 PM,4:30 PM,4:45 PM,5:00 PM,5:15 PM,5:30 PM,5:45 PM,6:00 PM,6:15 PM,6:30 PM,6:45 PM,7:00 PM,7:15 PM,7:30 PM,7:45 PM,8:00 PM,8:15 PM,8:30 PM,8:45 PM,9:00 PM,9:15 PM,9:30 PM,9:45 PM,10:00 PM,10:15 PM,10:30 PM,10:45 PM,11:00 PM,11:15 PM,11:30 PM,11:45 PM,12:00 AM,12:15 AM,12:30 AM,12:45 AM,1:00 AM,1:15 AM,1:30 AM,1:45 AM,2:00 AM,2:15 AM,2:30 AM,2:45 AM,3:00 AM,3:15 AM,3:30 AM,3:45 AM,4:00 AM,4:15 AM,4:30 AM,4:45 AM
7/1/2014,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7/2/2014,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7/3/2014,,,,,,,,,,
@keithhamilton
keithhamilton / time_cruncher.py
Last active August 29, 2015 14:03
Takes your timesheet in CSV format and aggregates the time per job per day of the time period.
'''
0. Disclaimer
This is not a silver bullet. It is simply a tool that I made so I could summarize my weekly time tracking.
If you are looking for a silver bullet...sorry? Not sorry. Next point.
1. How to use
a) write this into a csv file on your computer somewhere: http://bit.ly/1pYAruL
b) copy the below script into a py file on your machine, probably in the same location as your csv file.
c) open that shit in Excel or Numbers, your choice.
d) enter your time. You can enter your time however makes sense to you. For example, I use "ADM" as
@keithhamilton
keithhamilton / gist:9b618e99eb58779b665f
Last active August 29, 2015 14:04
Java Installs for IntelliJ IDEA on OS X Yosemite
#!/bin/bash
# Oracle hasn't updated the Java 1.7u65 installer to support Yosemite,
# so here's a way to get it installed.
# This is actually what I used to get IntelliJ IDEA running, but even
# if you aren't running that IDE, this is a quick script to get Java
# going strong on your fresh install of OS X 10.10
# Install Java 6 for OS X
@keithhamilton
keithhamilton / osx_dev_tool_installer.bash
Last active August 4, 2016 13:52
OS X Dev tool installer, version 2
#!/bin/bash
# Keith's bootstrap file for a clean OS
# Install oh-my-zsh
curl -L http://install.ohmyz.sh | sh
# Install homebrew
# Current xcode command-line tools at:
# https://developer.apple.com/downloads/index.action#
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@keithhamilton
keithhamilton / speechToScalar.js
Last active August 29, 2015 14:15
Deriving Real Integers From Speech
/*
* Fun Fact: when working in the realm of real, integer numbers,the English
* language follows a curious pattern:
*
* For each word in a scalar as spoken, such as 'three hundred thousand
* two hundred forty five', a real value can be derived by considering each
* number successively and applying the following formula:
*
* phrase.split(' ') => array with length l
* for i in phrase:
iex(5)> Fika.FloatSched.Tasks.all_tasks
|> Fika.Util.Filter.get_all_values("project_name")
|> Enum.sort(&(&2 > &1))
"2015 Dodge Combo Campaign",
"2015 Football TV Behind the Scenes Video",
"2015 Jimmy Graham Shopper",
"2015 Powerade Brand Social",
"2016 Batman vs Superman Jeep",
"2016 Olympics",