Skip to content

Instantly share code, notes, and snippets.

View unindented's full-sized avatar

Daniel Perez Alvarez unindented

View GitHub Profile
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@BanzaiMan
BanzaiMan / irb-applet5.html
Created November 24, 2010 02:06
JRuby IRB applet sample in HTML 5 (confirmed to work on Firefox and Safari on the Mac; does not work on Google Chrome)
<!DOCTYPE html>
<html>
<head>
<title>JRuby IRB</title>
<meta charset="utf-8">
<style type="text/css">
.code {font-family: "Courier New", Courier, mono;}
</style>
</head>
<body>
@igrigorik
igrigorik / webapp.rb
Created November 13, 2010 21:28
Inspired by @JEG2's talk at Rubyconf... Any ruby object, as a webapp! 'Cause we can. :-)
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end