Skip to content

Instantly share code, notes, and snippets.

@zh
zh / default.rb
Created December 3, 2012 14:36 — forked from wilmoore/default.rb
DIY Private Cloud w/ VirtualBox and Chef
# Cookbook Name:: mongodb
# Recipe:: default
case node['platform']
when "ubuntu"
execute "apt-get update" do
action :nothing
end
execute "add gpg key" do
@zh
zh / uninstall_homebrew.sh
Created November 29, 2012 14:56 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@zh
zh / main.c
Created October 29, 2012 08:41 — forked from holachek/main.c
AVR Tutorial main.c
#define F_CPU 1000000 // CPU frequency for proper time calculation in delay function
#include <avr/io.h>
#include <util/delay.h>
int main (void)
{
DDRD |= (1 << PD6); // make PD6 an output
for(;;)
{
PORTD ^= (1 << PD6); // toggle PD6
@zh
zh / Makefile
Created October 29, 2012 08:41 — forked from holachek/Makefile
AVR Tutorial Makefile
# Name: Makefile
# Author: <insert your name here>
# Copyright: <insert your copyright message here>
# License: <insert your license reference here>
# DEVICE ....... The AVR device you compile for
# CLOCK ........ Target AVR clock rate in Hertz
# OBJECTS ...... The object files created from your source files. This list is
# usually the same as the list of source files with suffix ".o".
# PROGRAMMER ... Options to avrdude which define the hardware you use for
@zh
zh / osx_developer_installation.rst
Created October 22, 2012 07:27 — forked from stefanfoulis/osx_developer_installation.rst
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Homebrew

@zh
zh / deploy.rb
Created July 20, 2012 06:23 — forked from ahawkins/deploy.rb
Deploy script for Heroku apps
#!/usr/bin/env ruby
# This is a basic deploy script for Heroku apps.
# It provides a structure you can use to expand on
# and add your own prereqs and deploy tasks.
#
# It basically ensures that:
# 1. There are no uncommited files
# 2. You can ssh to github
# 3. You can connect to heroku
@zh
zh / rbenv-howto.md
Created July 5, 2012 07:26 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@zh
zh / gist:2832946
Created May 30, 2012 02:22 — forked from jasoncodes/gist:1223731
Installing Ruby 1.9.3 with rbenv
brew install rbenv
brew install ruby-build
brew install --HEAD https://raw.github.com/jasoncodes/homebrew/rbenv-vars/Library/Formula/rbenv-vars.rb # https://github.com/mxcl/homebrew/pull/7891
brew install readline
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
exec $SHELL -i # reload the shell
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
gem install bundler rbenv-rehash git-up hitch gem-browse gem-ctags cheat awesome_print pry
gem ctags
@zh
zh / Gemfile
Created May 15, 2012 05:12 — forked from mbleigh/Gemfile
Non-Rails Rackup with Sprockets, Compass, Handlebars, Coffeescript, and Twitter Bootstrap
source "https://rubygems.org"
gem 'sprockets'
gem 'sprockets-sass'
gem 'sass'
gem 'compass'
gem 'bootstrap-sass'
gem 'handlebars_assets'
gem 'coffee-script'
@zh
zh / application
Created March 14, 2012 05:06
Sprockets without Rails
ROOT
assets/
javascripts/
application.js
biz.js.coffee
bar.js.coffee
stylesheets/
application.css
baz.css.scss
foo.css.scss