Skip to content

Instantly share code, notes, and snippets.

View topfunky's full-sized avatar
🛠️

Geoffrey Grosenbach topfunky

🛠️
View GitHub Profile
@topfunky
topfunky / jammit_sass_support.rb
Created August 6, 2011 00:01 — forked from mitio/jammit_sass_support.rb
SASS support for Jammit in development mode (also with proper plugins support, for e.g. Compass)
# Much simpler, less work. Handles everything SASS can.
require 'haml/util'
require 'sass/engine'
module Jammit
module Helper
SASS_TIMESTAMPS = {}
def include_stylesheets_with_sass(*packages)
@topfunky
topfunky / new-github.sh
Created July 25, 2011 22:23
Shell shortcut to setup a Git repo with GitHub. Works with zsh or bash.
# Usage: new-github topfunky tidy_table
function new-github() {
git remote add origin git@github.com:$1/$2.git
git push origin master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git config push.default current
}
@topfunky
topfunky / new-git.sh
Created June 9, 2011 15:03
Create a new git repository on a remote server. Assumes that you're sitting in an initialized Git repo.
function new-git () {
ssh git@example.com "mkdir $1.git && cd $1.git && git --bare init"
git remote add origin git@example.com:$1.git
git push origin master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git config push.default current
}
@topfunky
topfunky / Rakefile
Created April 16, 2011 01:22
Render After Effects sketches
AFTER_EFFECTS_EXPORT_DIRECTORY = "film/after_effects"
rule ".mov" => proc {|task_name|
task_name.sub(/\.mov/,
'.aep').sub(AFTER_EFFECTS_EXPORT_DIRECTORY,
'artwork/after_effects') } do |t|
if !t.name.match("Adobe After Effects Auto-Save")
puts "Rendering #{t.source} to #{t.name}"
output_template = "Animation"
@topfunky
topfunky / Cakefile
Created April 14, 2011 22:18
Watch both Sass and Coffee files and compile on change (for Node.js)
###
Modified from https://github.com/jashkenas/coffee-script/blob/master/Cakefile
Part of an upcoming PeepCode screencast. This snippet is MIT Licensed.
###
{spawn, exec} = require 'child_process'
task 'assets:watch', 'Watch source files and build JS & CSS', (options) ->
runCommand = (name, args) ->
@topfunky
topfunky / build.applescript
Created January 6, 2011 00:57
Run with FastScripts for clean builds every time
tell application "Xcode"
activate
clean
build
launch
end tell
" Vim color file
" Maintainer: Geoffrey Grosenbach <boss@topfunky.com>
" Last Change: 2010 June 3
" License: Public Domain
" A color theme with a white background. Modified from an existing theme.
"
" It's supposed to look like the Emacs standard colors, at least
" for C. But Emacs has different categories, so it's not very good.
;; For Emacs on Mac OS X http://emacsformacosx.com/
;; Opens files in the existing frame instead of making new ones.
(setq ns-pop-up-frames nil)
(defun byte-recompile-home ()
"Speed load time"
(interactive)
(byte-recompile-directory "~/.emacs.d" 0))
(defun vim-open-buffer ()
"Open current file in Vim"
(interactive)
(shell-command-to-string (concat "vim " buffer-file-name)))