Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def bar | |
puts "baz" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dsdfdsf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make merb resource route url link_to's with class deletable fake delete HTTP method. | |
jQuery.fn.deletable = function() { | |
return this.each(function() { | |
var delete_link = $(this); | |
var hidden_form = document.createElement('form'); | |
hidden_form.style.display = 'none'; | |
delete_link.append(hidden_form); | |
hidden_form.method = 'POST'; | |
hidden_form.action = delete_link.attr('href'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def satisfy?( request ) | |
METHODS.all? do | method | | |
wanted = instance_variable_get( "@#{method}") | |
got = request.send( method ) if wanted | |
wanted.is_a? Proc ? wanted.call( got ) : wanted === got | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size := Object clone | |
large := Size new | |
medium := Size new | |
small := Size new | |
Colour := Object clone | |
black := Colour new | |
brown := Colour new | |
white := Colour new | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Getting the gist of Gist</title> | |
</head> | |
<body> | |
like a fox | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what is this? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Quote extends Feathers implements Feather { | |
public function __construct() { | |
$this->setField(array("attr" => "quote", | |
"type" => "text_block", | |
"rows" => 5, | |
"label" => __("Quote", "quote"), | |
"bookmarklet" => "selection")); | |
$this->setField(array("attr" => "source", | |
"type" => "text_block", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#shsql tools | |
SH_PATH=/usr/local/shsql/ | |
shsqlstart=${SH_PATH}shsqlstart | |
shsql=${SH_PATH}shsql | |
shsqlend=${SH_PATH}shsqlend | |
shsqlline=${SH_PATH}shsqlline | |
SHSQL=mysql; export SHSQL | |
HANDLE=`${shsqlstart} "host=${SQL_HOST} dbname=${SQL_DBNAME} user=${SQL_USERNAME} password=${SQL_PASSWORD}"` |