Skip to content

Instantly share code, notes, and snippets.

require 'linahi' # this is just my app, which seems to work ok
require 'sinatra/test/spec'
context 'Linahi' do
specify 'should list files when asked' do
get_it '/'
puts body
end
CmdUtils.CreateCommand(
{
name: "ruby",
takes: {"function": noun_arb_text},
icon: "http://ruby-doc.org/favicon.ico",
homepage: "http://jackndempsey.blogspot.com",
author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"},
license: "MPL,GPL",
description: "Search ruby functions documentation",
help: "Select a ruby function",
@sr
sr / gist:7870
Created August 29, 2008 00:57 — forked from al3x/al3x_ubiquity.js
CmdUtils.CreateCommand({
name: "bitly",
takes: {"url to shorten": noun_arb_text},
preview: "Replaces the selected URL with a bit.ly-shortened URL.",
description: "Replaces the selected URL with a bit.ly-shortened URL.",
icon: "http://bit.ly/favicon.png",
execute: function( urlToShorten ) {
var baseUrl = "http://bit.ly/api";
var params = {url: urlToShorten.text};
jQuery.get(baseUrl, params, function(shortenedUrl) {
class String
# ANSI-colored version of the string
def colorize(color)
n = case color
when :black: 30
when :red: 31
when :green: 32
when :yellow: 33
when :blue: 34
when :magenta: 35