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
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" | |
xmlns:v="urn:schemas-microsoft-com:vml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Ryan's Map</title> | |
</head> | |
<body> | |
<div id="map" style="width:800;height:600px;"></div> |
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
# gem install nokogiri --no-ri --no-doc | |
# gem install open-uri --no-ri --no-doc | |
# | |
# To run just 'ruby download_natas_brochures.rb' | |
# | |
require 'rubygems' | |
require 'nokogiri' | |
require "open-uri" |
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
################################################################# | |
# Developed by Ashok Kumar | |
# 1:50 PM Monday, February 04, 2008 | |
################################################################# | |
TOT=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'` | |
USED=`cat /proc/meminfo | grep Active: | awk '{print $2}'` | |
FREE=$[$TOT - $USED ] | |
LOG=/tmp/mem_monitor.log | |
echo > $LOG |
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 Image | |
attr_accessor :property_id, :property_name, :url, :img_code, :img_name, :category, :caption, :description, | |
:width, :height, :original_size | |
def initialize(options = {}) | |
options.each {|k,v| self.send("#{k}=", v) } | |
end | |
def self.from_csv(line, opts= {}) | |
delim = opts[:delim] || '|' |
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
module Leonardo | |
class XmlParser | |
@@parser_logger = Logger.new(File.join(LOG_PATH, "leonardo_xml_parser_#{Gazo::Time.pretty_day}.log")) | |
@@error_logger = Logger.new(File.join(LOG_PATH, "leonardo_xml_parser_error_#{Gazo::Time.pretty_day}.log")) | |
SIZES = { :A => '70x70!', :B => '100x100', :D => '200x200', :J => '480x480'} | |
IMG_PATH_PREFIX = "http://images.leonardo.com/imgs" | |
class << self |
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
<html> | |
<head> | |
<title>[NEAT] Sample AFS Javascript Page</title> | |
<style> | |
body{ font-family:arial; } | |
.search_header{ background:#eee; padding:4px; font-size:15px; font-weight:bold; } | |
.wide_ads { background:#ddf8cc; padding:10px; } | |
.narrow_ads { background:#e5ecf9; padding:10px; } | |
/* WEGO AFS */ |
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
{"map": [ | |
[ | |
"GA", | |
[ | |
{ | |
"amount": "106.35", | |
"currencyCode": "SGD", | |
"airlineCode": "GA", | |
"airlineName": "Garuda Indonesia", | |
"origin": { |