This file contains hidden or 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
##### EXPORTS ################################################################ | |
export PATH=/opt/local/bin:/opt/local/sbin:$HOME/bin:$PATH | |
export LC_CTYPE=en_US.UTF-8 | |
# Editors | |
export EDITOR='mate -w' | |
export SVN_EDITOR='mate -w' | |
export GIT_EDITOR='mate -w' | |
# for Editor Kicker: http://editorkicker.rubyforge.org/ | |
export EDITOR_KICKER="mate -l %s '%s'" |
This file contains hidden or 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 | |
# Get ThisService from http://wafflesoftware.net/thisservice/ | |
# Use this .rb file with Type: "Acts on Input" and click "Create Service" | |
# From now on, you can twit the selected text in *any* Cocoa application by | |
# selecting Application menu » Services » Twit This | |
# | |
# The first time you use it you'll be prompted for authorisation to use your | |
# saved user and password from Keychain.app | |
input = STDIN.gets nil |
This file contains hidden or 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
# Sinatra sample app. | |
# | |
# Usage: | |
# $ sudo gem install sinatra | |
# $ ruby this_file.rb | |
# $ open http://0.0.0.0:4567/ | |
require "rubygems" | |
require "sinatra" | |
This file contains hidden or 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 | |
# | |
# A crude image comparison tool. | |
# | |
# Usage: | |
# vdiff original_image modified_image | |
require "rubygems" | |
require "RMagick" | |
This file contains hidden or 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
# Shell script para buscar dominios disponibles a partir de listas de palabras. | |
# Acepta un fichero como parámetro, y por defecto usa el listado de lemas de | |
# http://olea.org/proyectos/lemarios/ | |
# | |
# Para cambiar el criterio de búsqueda, modifica la condicion de la primera línea | |
# con los parámetros que necesites | |
condicion = lambda{ |i| i.length >= 3 } | |
INPUT_FILE = ARGV[0] || "lemario-espanol-2002-10-25.txt" |
This file contains hidden or 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
# RAE | |
require "rubygems" | |
require "curb" | |
require "hpricot" | |
def url_for word | |
"http://buscon.rae.es/draeI/SrvltGUIBusUsual?LEMA=#{word}&origen=RAE&TIPO_BUS=3" | |
end | |
def get_definition_for(word) |
This file contains hidden or 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 Test::Unit::TestCase | |
def self.test(name, &block) | |
test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym | |
defined = instance_method(test_name) rescue false | |
raise "#{test_name} is already defined in #{self}" if defined | |
if block_given? | |
define_method(test_name, &block) | |
else | |
define_method(test_name) do | |
flunk "No implementation provided for #{name}" |
This file contains hidden or 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 Python plugin for VoodooPad. | |
# It searches for tag_name appearances in your document and adds the text after it to | |
# a new list_page page. | |
VPScriptSuperMenuTitle = "GTD" | |
VPScriptMenuTitle = "Update @todo list" | |
VPShortcutKey = "T" | |
VPShortcutMask = "control" | |
import time |
This file contains hidden or 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 'erb' | |
files = Dir.glob("*") | |
templates = DATA.read.split("---") | |
templates.each do |template| | |
ERB.new(template, nil, '%-').run | |
end | |
__END__ | |
package { |
This file contains hidden or 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 bash | |
# A script to create a new remote git repo in git | |
# | |
# 1. Make sure to setup ssh keys for passwordless logins | |
# | |
# 2. Add this to $HOME/.ssh/config: | |
# Host git | |
# HostName your.domain.com | |
# User username |
OlderNewer