Skip to content

Instantly share code, notes, and snippets.

Pete Nicholls Aupajo

Block or report user

Report or block Aupajo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Aupajo / gist:139093
Created Jul 1, 2009 — forked from gabe/gist:137356
Possible implementation of Sinatra URI templates?
View gist:139093
require 'addressable/template'
module Juxt
module Sinatra
# Allows for declared, named URI Templates in Sinatra applications,
# for both routing and URI generation.
# The URI generation method (included as a Sinatra helper) modifies
# the path of generated URIs with request.script_name, meaning the
# URIs generated will still be valid if multiple Sinatra applications
View twat.rb
#!/usr/bin/env ruby
# Find common Twitter friends
# Usage: ./twat.rb user1 user2 ...
lists = ARGV.inject({}) do |hash, username|
page = 0
while !(output = `curl -s{username}.xml?page=#{page += 1} | grep "<screen_name>"`.gsub(%r{</?screen_name>}, '').split).empty?
hash[username] = ((hash[username] || []) + output).sort
Aupajo / gist:61649
Created Feb 10, 2009 — forked from anonymous/gist:61647
Top used commands
View gist:61649
history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -n | tail | sort -nr
83 nano
55 git
47 ssh
47 ghproxy
47 cd
36 ls
24 ping
19 sudo
View github-code-search.js
// Based on Ubiquity Search:
name: "github",
takes: {"function": noun_arb_text},
icon: "",
homepage: "",
author: {name: "Tiago Bastos", email: ""},
license: "MPL,GPL",
description: "Search on Github Code Search",
You can’t perform that action at this time.