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
ct = ct.replace(/^(@)(\w+)/g, ' @<a href="'+twitterURL+'$2">$2</a>'); | |
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
select | |
database_id as 'Database ID', name as 'Database Name', | |
CASE encryption_state | |
WHEN 0 THEN 'No database encryption key present, no encryption' | |
WHEN 1 THEN 'Unencrypted' | |
WHEN 2 THEN 'Encryption in progress' | |
WHEN 3 THEN 'Encrypted' | |
WHEN 4 THEN 'Key change in progress' | |
WHEN 5 THEN 'Decryption in progress' | |
WHEN 6 THEN 'Protection change in progress' |
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 'active_support' | |
require 'active_support/core_ext/hash' | |
require 'net/http' | |
require 'json' | |
FLICKR_USER_ID = '47465178@N06' | |
res = Net::HTTP.get('api.flickr.com',"/services/feeds/photos_public.gne?id=#{FLICKR_USER_ID}") | |
res_hash = Hash.from_xml(res) | |
res_hash["feed"]["entry"].each do |image| | |
puts image["link"][1]["href"] | |
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
class Numeric | |
def to_zlorp(zlorp = "") | |
case self | |
when 0 | |
zlorp << "-" | |
when 1 | |
zlorp << "|" | |
when 2 | |
zlorp << "X" | |
when 3 |