Skip to content

Instantly share code, notes, and snippets.

@ddaws
ddaws / cube-it.sh
Last active August 29, 2015 14:16
Prepare linux VMs for packaging as a Vagrant Box
#!/bin/bash
# Dawson Reid
# Feb 25, 2015
# Note : Currently only supports Debian.
VAGRANT_USERNAME="vagrant"
VAGRANT_PASSWORD="vagrant"
LANGUAGE_LOCAL="en_US"
@ddaws
ddaws / Gruntfile.coffee
Created July 3, 2014 16:27
CoffeeScript Grunt Tools
###
Dawson Reid (dawson@streamlyne.co)
###
exec = require('child_process').exec
util = require 'util'
path = require 'path'
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-coffee'
#!/bin/bash
WORKON_HOME=$HOME/.virtualenv
if [ ! -d "$WORKON_HOME" ]; then
pip install virtualenvwrapper
export WORKON_HOME=$WORKON_HOME
mkdir -p $WORKON_HOME
@ddaws
ddaws / rbenv-install.sh
Last active August 29, 2015 13:59
Rbenv install script I currently use with [Vagrant](http://www.vagrantup.com/) in [Development Enviroment](https://github.com/dreid93/devenv).
#!/bin/bash
RBENV_DIR=$HOME/.rbenv
if [ ! -d "$RBENV_DIR" ]; then
git clone https://github.com/sstephenson/rbenv.git $RBENV_DIR
echo 'export PATH="$RBENV_DIR/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git $RBENV_DIR/plugins/ruby-build
@ddaws
ddaws / required.py
Created February 23, 2014 04:23
The following may be used within a setup.py file to ensure packages are installed prior to the installation process.
def is_installed(pkg):
'''
Tests if a python module is installed.
'''
try:
__import__(pkg)
return True
except ImportError:
return False
@ddaws
ddaws / minimum.py
Last active August 29, 2015 13:56
I like to place this header at the top of all of my python modules.
'''!
'''
from __future__ import (
print_function,
unicode_literals,)
__author__ = 'Dawson Reid <dawson@streamlyne.co>'
import logging