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 Object | |
# just a more verbose way of reversing predicates. | |
# | |
# lets you do things like | |
# ' '.not_blank? # => false | |
# instead of | |
# !' '.blank? # => false | |
# doesn't work sometimes if someone is using method_missing | |
# somewhere (i.e. rails) | |
def method_missing(method, *args, &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
# $Id: svntouch.sh 602 2007-10-01 19:40:17Z galbrecht $ | |
# $URL$ | |
# svntouch.sh | |
# description | |
# touch a file and add it to svn | |
# this saves the steps fo having to do these two things manually: | |
# $ touch file | |
# $ svn add file | |
# usage | |
# requires at least one argument, the name of the file to touch & add |
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
// fun syntax for making elements on the page. | |
// from Aardvark Tools | |
jQuery.el= function(elem,properties) { | |
var i, s, p, c; | |
if (typeof(elem)=="string") | |
elem = document.createElement(elem); | |
if (properties) { | |
s = properties.style; | |
if (s) |
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
# kinda stupid but functional add all question marks for svn | |
for i in $( svn st | grep ? ); do | |
svn add $i | |
done |
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 Object | |
def collapse | |
memcache.store :key => object_id, :value => ENV["HOST_NAME"] | |
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
require 'rubygems' | |
require 'ruby2ruby' | |
def fun *proc, &blk | |
if block_given? | |
puts blk.to_ruby | |
else | |
puts proc[0].to_ruby | |
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
#!/usr/bin/env ruby | |
# script written by github.com/masover | |
require 'fileutils' | |
(base, theirs, mine, target) = *ARGV | |
files = [mine, base, theirs] | |
stats = files.map{|f| [f, File.stat(f).mtime]} | |
system('meld', *files) || raise('Meld died!') |
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
var the = 'part of speech'; | |
var sorry = "yeah i'm pretty sure this doesn't make sense."; |
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
BandInvite = $.clonable({ | |
inviteEl: {} | |
,successEvent: function () { | |
debugger; | |
} | |
,findAcceptLink: function () { | |
var invite = this; | |
this.inviteEl.find('.accept-invite a').click(function () { | |
$.ajax({ | |
type: 'POST', |
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
$.fn.tap = function (fun) { | |
fun.call(this) | |
} | |
// oops this is pointless, these are the same | |
$('whatever') | |
.tap(function () { | |
this // is pointless | |
}); |
OlderNewer