Skip to content

Instantly share code, notes, and snippets.

View chrishoffman's full-sized avatar

Chris Hoffman chrishoffman

  • Pennsylvaina, USA
View GitHub Profile
@onyxfish
onyxfish / fabfile.py
Created February 9, 2010 23:05
Chicago Tribune News Applications fabric deployment script
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
@jamie
jamie / sinatra_reloader.rb
Created June 24, 2010 15:19 — forked from nutrun/sinatra_reloader.rb
sinatra-reloader standalone
# For "Classic" style/top-level type of apps do something like:
#
# configure :development do
# require File.join(File.dirname(__FILE__), 'sinatra_reloader')
# set :reload_paths, [File.join(File.dirname(__FILE__), '**', '*.rb')]
# end
#
# For "Modular" style/Sinatra::Base subclasses:
#
# configure :development do
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@border
border / Makefile
Created January 12, 2011 01:36
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@jstangroome
jstangroome / Send-RemotingFile.ps1
Created January 22, 2011 13:04
Transfers a single file to another machine via the PowerShell Remoting protocol
#requires -version 2.0
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$ComputerName,
[Parameter(Mandatory=$true)]
[string]
@stratalux
stratalux / joinDomain.rb
Created April 15, 2011 17:36
Join Domain with Chef
#
# Cookbook Name:: development
# Recipe:: renameComputer
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
powershell "Join Active Directory Domain" do
@derekcollison
derekcollison / Cloud Foundry Production Updates
Created April 16, 2011 17:11
How to update your application in Cloud Foundry without dropping user requests..
# vmc update is great for test and development, however it stops your old app and stages and starts the new one,
# resulting in dropped requests.
# If you want to update an application without dropping user requests, see below.
# NOTE: This change assumes your application can share services, etc with the new version.
# Assume my app is named foo
vmc push foo-v2 --url foov2.cloudfoundry.com
@johan
johan / draw-svg.js
Created June 4, 2011 10:18
Draw an SVG bit by bit
var steps = 0 // steps drawn on the current element, so far
, info = document.getElementById('next_step')
, svgs = [].slice.call(document.getElementsByTagName('svg'))
, svg, walker, current;
function lexSVGPath(d) {
function command(seg) {
var cmd = seg.match(/[a-z]/i), arg, cnt;
if (cmd) {
cmd = cmd[0]; // which subcommand
@pithyless
pithyless / gist:1208841
Created September 10, 2011 21:49
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@karmi
karmi / hbase-rest-examples.sh
Created September 15, 2011 09:53
Experiments with the HBase REST API
#!/usr/bin/env bash
#
# ===================================
# Experiments with the HBase REST API
# ===================================
#
# <http://hbase.apache.org/docs/r0.20.4/api/org/apache/hadoop/hbase/rest/package-summary.html>
#
# Usage:
#