Skip to content

Instantly share code, notes, and snippets.

@sbjustin
sbjustin / zlorp.rb
Last active December 25, 2015 16:59
Zlorpian to decimal - Answer to @bokmann's puzzle found at https://gist.github.com/bokmann/6985516
class Numeric
def to_zlorp(zlorp = "")
case self
when 0
zlorp << "-"
when 1
zlorp << "|"
when 2
zlorp << "X"
when 3
#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
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'
ct = ct.replace(/^(@)(\w+)/g, ' @<a href="'+twitterURL+'$2">$2</a>');