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 '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 |
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 | |
# Find common Twitter friends | |
# Usage: ./twat.rb user1 user2 ... | |
lists = ARGV.inject({}) do |hash, username| | |
page = 0 | |
while !(output = `curl -s http://twitter.com/statuses/friends/#{username}.xml?page=#{page += 1} | grep "<screen_name>"`.gsub(%r{</?screen_name>}, '').split).empty? | |
hash[username] = ((hash[username] || []) + output).sort | |
end | |
hash |
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
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 |
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
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132 | |
CmdUtils.CreateCommand( | |
{ | |
name: "github", | |
takes: {"function": noun_arb_text}, | |
icon: "http://github.com/fluidicon.png", | |
homepage: "http://tiago.zusee.com", | |
author: {name: "Tiago Bastos", email: "comechao@gmail.com"}, | |
license: "MPL,GPL", | |
description: "Search on Github Code Search", |