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
#!/usr/bin/env ruby | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
#ported to ubuntu from https://gist.github.com/1024587 | |
#it will ask for sudo privileges. | |
#if your wlan card is not "wlan0" change the "my_wifi_card" variable |
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
#!/usr/bin/env ruby | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
require 'digest/md5' | |
messages = [] | |
unless !File.exists?('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport') |
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
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 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 User < ActiveRecord::Base | |
require 'digest/md5' | |
validates_presence_of :email, :password | |
def self.authenticate(email, password) | |
User.find_by_email_and_password(email, Digest::MD5.hexdigest(password)) | |
end | |
def password=(password) |