This file contains hidden or 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 'sequel' | |
require 'active_support/core_ext' | |
Sequel.extension :migration | |
DB = Sequel.connect(:adapter => 'jdbc', | |
:driver => 'com.microsoft.sqlserver.jdbc.SQLServerDriver', | |
:username => 'vulcan_dev', | |
:password => 'vulcan_dev', | |
#:username => 'read_only', |
This file contains hidden or 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
# in searchterm.rb google_cache_refer method | |
query_value = @params['q'].to_s unless @params.nil? or @params['q'].nil? | |
# Ruby 1.8, result, successful: | |
# query_value | |
Equifax Credit Watch� Gold with 3-in-1 Monitoring with FICO� Score promotional code | |
cache:mL7CWXTyDjAJ:www.archive.org/stream/lenovveavcyneeov00cruc/lenovveavcyneeov00cruc_djvu.txt duc qiu | |
# Ruby 1.9, result: | |
# query_value |
This file contains hidden or 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 'sequel' | |
require 'active_support/core_ext' | |
DB = Sequel.connect(:adapter => 'jdbc', | |
:driver => 'com.microsoft.sqlserver.jdbc.SQLServerDriver', | |
:username => 'read_only', | |
:password => 'read_only', | |
:uri => 'XXXX') | |
p 'connecting' |
This file contains hidden or 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 'sequel' | |
require 'active_support/core_ext' | |
module Sequel | |
class Model | |
def empty? | |
puts "Using undocumented Sequel behavior\n" + caller(0).join("\n") | |
self.values.empty? | |
end | |
end |
This file contains hidden or 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
Date: Mon, 28 May 2012 13:25:34 +0800 | |
From: [email protected] | |
To: [email protected] | |
message-id: <[email protected]} | |
Subject: Offers.com US - Stackable and Deals alert - 2012-05-28 | |
Mime-Version: 1.0 | |
Content-Type: multipart/alternative; | |
boundary="--==_mimepart_4fc30c4e94700_713d840632e1"; | |
charset=UTF-8 | |
Content-Transfer-Encoding: 7bit |
This file contains hidden or 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
PATH | |
remote: ../vulcan-bing | |
specs: | |
vulcan-bing (1.6.3-java) | |
adcenter-client (~> 8) | |
addressable | |
fastercsv | |
gli | |
jruby-openssl | |
logging (~> 1.4) |
This file contains hidden or 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
#include <stdio.h> | |
int main() | |
{ | |
int (^static_add)(int) = ^(int a) { | |
return a + 1; | |
}; | |
printf("%d\n", static_add(1)); | |
} |
This file contains hidden or 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 'open-uri' | |
if ["--help", "help", "-h"].include?(ARGV[0]) || ARGV.size < 1 | |
puts "Usage: #{File.basename __FILE__} ( 540p | 540i | 360p | 360i | 360is | 224p )" | |
exit 0 | |
end | |
size_hash = {"540p" => "2540", "540i" => "1840", "360p" => "1240", "360i" => "0640", "360is" => "0440", "224p" => "0240"} | |
video_size = size_hash[ARGV[0]] |