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 '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 | |
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
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", |
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
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) { |
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 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 |
NewerOlder