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? |
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
# = Random password generator | |
# Generate 12 chars-long alphanumeric passwords | |
$ alias random_password | |
alias random_password='openssl rand -base64 1000 | tr -cd "[:alnum:]" | cut -c 1-12' | |
$ random_password | |
EWLdOGjJnfl3 | |
$ random_password | |
RBkQi2bkHxWt | |
$ random_password | |
l0TaXzLVvoBJ |
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
% Fue ver implementado el QuickSort en Erlang | |
% Y acto seguido estaba comprando un libro de Erlang en Amazon | |
quicksort([]) -> []; | |
quicksort([Pivot|Rest]) -> | |
quicksort([Front || Front <- Rest, Front < Pivot]) | |
++ [Pivot] ++ | |
quicksort([Back || Back <- Rest, Back >= Pivot]) |
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 | |
# By: Ernesto Jiménez <[email protected]> | |
# | |
# This script will generate aliases for all your applications | |
# in your /Applications folder in OS X allowing you to easily | |
# open applications from your command line. | |
# Examples: | |
# safari http://ernesto-jimenez.com | |
# finder ~ | |
# quicktime-player /path/to/video.mov |
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
<% form_for_identity_verification_gateway("API-KEY", {:action => 'create'}, {:public_verification => true}) do %> | |
<%= hidden_field_tag 'lang', 'en' %> | |
<%= submit_tag "Identificarse" %> | |
<% end %> |
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 TestController < ApplicationController | |
include Tractis::IdentityVerifications | |
def create | |
valid_tractis_identity_verification!("API-KEY", params) | |
render :text => <<-TEXT | |
<pre> | |
Identified | |
Name: #{params["tractis:attribute:name"]} | |
eID #: #{params["tractis:attribute:dni"]} |
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 'lib/tvtrack' | |
config = TVTrack::Config.instance | |
config[:username] = 'USUARIO' | |
config[:password] = 'PASSWORD' | |
puts "Running at #{Time.now}" | |
eztv = TVTrack::Base.instance | |
eztv.download_torrents |
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
$ ruby itunes.rb | |
Top Gratuitas | |
==================== | |
1 - WiFi Telefónica | |
2 - Burning Tires™ 3D Lite | |
3 - SHOUTcast Radio | |
4 - COPE | |
5 - Toy Tanks™ 3D Lite | |
6 - SuperDial | |
7 - iMob Online |
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
=== hpricot-test.rb (1) | |
user system total real | |
bp.xml 0.070000 0.000000 0.070000 ( 0.070721) | |
posts.xml 0.000000 0.000000 0.000000 ( 0.001641) | |
timeline.xml 0.040000 0.000000 0.040000 ( 0.038301) | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
hydrus 18686 60.4 0,3 610836 11620 s004 S+ 11:23AM 0:00.29 ruby hpricot-test.rb 1 |
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
import java_cup.runtime.*; | |
import java.io.*; | |
import java.util.Hashtable; | |
import java_cup.runtime.Symbol; | |
parser code {: | |
public static void main(String argv[]) throws Exception { | |
String fInName = argv[0]; | |
int n = 0, nErrors = 0; | |
if (argv.length !=1) { |