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
def mura_collect # naming conventions | |
# begin <- begin is implied in a function | |
#define function Variables | |
query_name = "Mura" | |
con = Mysql.new(DB_Host, DB_User, DB_Pass, DB_Table) | |
open(@mura_url, | |
"User-Agent" => "Firefox", | |
"From" => "[email protected]", | |
"Referer" => "http://www.google.com") { |f| |
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 | |
require 'csv' | |
require 'net/http' | |
require 'open-uri' | |
require 'optparse' | |
require 'uri' | |
# You could have used %w[country_code country_name], but I think symbols make | |
# more sense for such fields. |
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
# Pixelation post-processing effect | |
# http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ | |
# Shaders ------------------- | |
PIXEL_SHADER =<<END | |
uniform sampler2D sceneTex; // 0 | |
uniform float vx_offset; | |
uniform float rt_w; // GeeXLab built-in | |
uniform float rt_h; // GeeXLab built-in |
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
# Observer | |
# ---------------- | |
module Observable | |
def add_observer(observer) | |
observers.push(observer) | |
end | |
def remove_observer(observer) |