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
provincias = ['Alava','Albacete','Alicante','Almería','Asturias','Avila','Badajoz','Barcelona','Burgos','Cáceres', | |
'Cádiz','Cantabria','Castellón','Ciudad Real','Córdoba','La Coruña','Cuenca','Gerona','Granada','Guadalajara', | |
'Guipúzcoa','Huelva','Huesca','Islas Baleares','Jaén','León','Lérida','Lugo','Madrid','Málaga','Murcia','Navarra', | |
'Orense','Palencia','Las Palmas','Pontevedra','La Rioja','Salamanca','Segovia','Sevilla','Soria','Tarragona', | |
'Santa Cruz de Tenerife','Teruel','Toledo','Valencia','Valladolid','Vizcaya','Zamora','Zaragoza'] | |
comunidades = ['Andalucía','Aragón','Principado de Asturias','Islas Baleares','País Vasco', | |
'Canarias','Cantabria','Castilla-La Mancha','Castilla y León','Cataluña','Extremadura','Galicia', | |
'Comunidad de Madrid','Región de Murcia','Navarra', 'La Rioja','Comunidad Valenciana','Ceuta','Melilla'] |
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 | |
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
class GitHub | |
def initialize(username) | |
@username = username |
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
using terms from application "Quicksilver" | |
on process text log_text | |
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'") | |
set theText to log_text | |
set theText to theDate & " " & theText & " | |
" | |
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string | |
set theFilePath to POSIX file thePosixFilePath | |
set theFileReference to open for access theFilePath with write permission | |
write theText to theFileReference starting at eof |
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
CmdUtils.CreateCommand({ | |
author: { name: "elbarto", email: "[email protected]"}, | |
description: "search w3schools with google", | |
name: "w3", | |
takes: {"w3": noun_arb_text}, | |
preview: function( pblock, searchTerm) { | |
pblock.innerHTML = "Searches w3schools for: " + searchTerm.text; | |
}, |
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
# Run rake db:size to get a print of your database size in bytes. | |
# Run rake db:tables:size to get the sizes for individual tables | |
# Works for MySQL and PostgreSQL. Not tested elsewhere. | |
namespace :db do | |
desc 'Print data size for entire database' | |
task :size => :environment do | |
database_name = ActiveRecord::Base.connection.instance_variable_get("@config")[:database] | |
adapter = ActiveRecord::Base.connection.adapter_name.downcase |
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
~$ ARCHFLAGS='-arch i386 -arch x86_64' | |
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes | |
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download | |
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0 | |
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes | |
~/RubyCocoa-1.0.0$ ruby install.rb setup | |
~/RubyCocoa-1.0.0$ sudo ruby install.rb install |
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
# Integration Test for ExceptionNotifier | |
# Please change this values for your own purposes: | |
# * UsersController | |
# * users_path | |
# | |
# Author: http://fernandoguillen.info | |
# | |
require 'test_helper' |
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 backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case | |
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement | |
Please fork, tweet about, etc. | |
---- | |
Creating Shazam in Java | |
A couple of days ago I encountered this article: How Shazam Works | |
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java? |