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
-- A script to have Paparazzi! <http://www.derailer.org/paparazzi/> take a screentshot | |
-- and save it. | |
-- by Benny Wong | |
-- 2008/10/02 | |
-- | |
-- Shamelessly adapted from <http://bbs.macscripter.net/viewtopic.php?pid=82666> | |
-- | |
-- Usage: | |
-- $ osascript screenshotous.scpt URL FILENAME | |
-- |
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 | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
date_prefix = Time.now.strftime("%Y-%m-%d") | |
postname = ARGV[0].strip.downcase.gsub(/ /, '-') | |
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile" |
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
# Copyright 2009 Michael Ivey, released to public domain | |
# Disqus guts lifted from http://github.com/squeejee/disqus-sinatra-importer/tree/master | |
# I wanted it to run from MySQL and command line, instead of a Sinatra app | |
require 'rubygems' | |
require 'rest_client' | |
require 'json' | |
require 'sequel' | |
disqus_url = 'http://disqus.com/api' |
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
// includes bindings for fetching/fetched | |
PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
this.page = 1; | |
}, | |
fetch: function(options) { | |
options || (options = {}); | |
this.trigger("fetching"); |
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
/* | |
Bullet Proof window drag | |
This is the most performant window dragging code | |
I could come up with. All the example on | |
developer.appcelerator.com we laggy | |
Version 2: More contained version | |
*/ |
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 node | |
var fs = require('fs'), | |
path = require('path'), | |
options = { | |
verbose: false, | |
directories: ['.'] | |
}; | |
var includeFollowing = false; |
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
#!/bin/bash | |
#assumes working copy is a fork & upstream is set to [email protected]:frapi/frapi.git | |
# temporarily move custom symlink | |
mv src/frapi/custom src/frapi/custom_symlink && | |
# reset any changes (i.e. deletion of custom folder) | |
git reset --hard && |
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
# https://github.com/funkatron/Spaz-Web-APIs | |
# | |
# Avatar methods | |
# | |
# basic structure | |
# http://api.getspaz.com/avatar/:service/:username.:format | |
# :service is currently "identi.ca" or "twitter.com" | |
# :username is the username | |
# :format is "json", "xml" or "js" (jsonp. sorta). JSON is default | |
# |
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
-- Stefan van den Oord, 2010-12-29 | |
-- The "cd to" command for iTerm2 | |
-- Original from: http://code.google.com/p/iterm2/wiki/AppleScript | |
-- Modified to open a new tab instead of a new window | |
tell application "Finder" | |
set _cwd to POSIX path of ((folder of (front window)) as alias) | |
end tell | |
tell application "iTerm" |
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 | |
// generate skip values | |
$skips = array(); | |
for ($x=0; $x < 900; $x++) { | |
$skips[] = $x; | |
} | |
$skip = $skips[array_rand($skips)]; | |
OlderNewer