Skip to content

Instantly share code, notes, and snippets.

View topfunky's full-sized avatar
🛠️

Geoffrey Grosenbach topfunky

🛠️
View GitHub Profile
# Convert xib files to Cappuccino cib files.
#
# Run with
#
# rake cib
#
# Will only re-generate the XIB files that are newer than their CIB counterparts.
rule '.cib' => '.xib' do |t|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CPBundleExecutable</key>
<string>exp-animation.sj</string>
<key>CPBundleIdentifier</key>
<string>com.topfunky.expAnimation</string>
<key>CPBundleInfoDictionaryVersion</key>
<real>6.0</real>
@topfunky
topfunky / Rakefile
Created October 2, 2009 18:59
Render After Effects diagrams from a Rakefile
namespace :ae do
desc "Render After Effects Titles and Diagrams"
task :render do
mkdir_p "artwork/after_effects_rendered"
Dir['artwork/after_effects/[0-9]*.aep'].each do |aep_project_name|
aep_project_name = File.expand_path(aep_project_name)
mov_output_name = aep_project_name.gsub(/\.aep/, '.mov').gsub(/artwork\/after_effects/, 'artwork/after_effects_rendered')
command = ["'/Applications/Adobe After Effects CS4/aerender'",
namespace :ae do
desc "Render After Effects Titles and Diagrams"
task :render do
mkdir_p "artwork/after_effects_rendered"
Dir['artwork/after_effects/[0-9]*.aep'].each do |aep_project_name|
aep_project_name = File.expand_path(aep_project_name)
mov_output_name = aep_project_name.gsub(/\.aep/, '.mov').gsub(/artwork\/after_effects/, 'artwork/after_effects_rendered')
command = ["'/Applications/Adobe After Effects CS4/aerender'",
@topfunky
topfunky / gist:169876
Created August 18, 2009 18:45 — forked from wmoxam/gist:36116
Munin plugin for beanstalk queue
#!/opt/ruby-enterprise/bin/ruby
# MODIFIED: Minor fork to run smoothly under Ruby 1.8.6. Heredoc cleanup.
require 'rubygems'
require 'beanstalk-client'
if ARGV.length > 0 && ARGV[0] == 'config'
puts <<-END
graph_category App
# Create a remote Mercurial repository and clone locally.
# Mercurial can manage an empty directory, so it can be done simply.
function hg-new {
ssh user@example.com "hg init $1" && hg clone ssh://user@example.com/$1
}
#!/usr/bin/env ruby
# Textileise things.
# Take Textile markup on STDIN, and output HTML to STDOUT
require "rubygems"
require "redcloth"
print (RedCloth.new STDIN.read).to_html
if (Dir.exist?(NSBundle.mainBundle.privateFrameworksPath))
$:.map! { |x| x.sub(/^\/Library\/Frameworks/, NSBundle.mainBundle.privateFrameworksPath) }
$:.unshift NSBundle.mainBundle.resourcePath.fileSystemRepresentation
end
(defun enter-to-previous-line ()
(interactive)
(beginning-of-line)
(newline-and-indent)
(previous-line)
(indent-according-to-mode))
(define-key textmate-mode-map [C-return] 'enter-to-previous-line)
#!/usr/bin/perl
# Graphical tree output of a filesystem
# `tree somepath_to_start_from`
#
# TODO show actual graphical output with dashes and bars
# TODO allow command-line options
use strict;
use File::Find;