Skip to content

Instantly share code, notes, and snippets.

=begin
Copyright (c) 2008 Hans Engel
See the file LICENSE for licensing details.
=end
task :spec do
require 'rubygems'
Gem::manage_gems
require 'rake/gempackagetask'
(= say
(lambda (something) (puts something)))
(say "anything")
test paste
test paste
curl -F 'repository[name]=API_Hotness' -F 'login=defunkt' -F 'token=6ef8395fecf207165f1a82178ae1b984' http://github.com/repositories
# Treetop file for the never released Oil
# Oil's spiritual successor is the released Jasper [ http://github.com/defunkt/jasper ]
module Oil
grammar Grammar
rule program
(space expression space)*
end
rule expression
(# examples i used to develop the never-completed Oil)
(# treetop parser is at http://gist.github.com/12454)
(# a simple math class
(= Math (Object.clone
(def square (x) (* x x))
(= square (do (x) (* x x)))
(def abs (x) (
if (>= x 0)
(x)
module Gem
def self.activate(gem, *version_requirements)
options = version_requirements.last.is_a?(Hash) ? version_requirements.pop : {}
sources = options[:sources] || []
if version_requirements.empty? then
version_requirements = Gem::Requirement.default
end
unless gem.respond_to?(:name) and
@defunkt
defunkt / .emacs-fun.el
Created September 24, 2008 20:48 — forked from seth/.emacs-fun
;; Emacs server
(server-start)
(add-hook 'server-switch-hook
(lambda nil
(let ((server-buf (current-buffer)))
(bury-buffer)
(switch-to-buffer-other-frame server-buf))))
(add-hook 'server-done-hook 'delete-frame)
(add-hook 'server-done-hook (lambda nil (kill-buffer nil)))
#!/usr/bin/env ruby
=begin
INSTALL:
curl http://github.com/defunkt/gist/tree/master%2Fgist.rb?raw=true > gist &&
chmod 755 gist &&
sudo mv gist /usr/local/bin/gist