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 'rubygems' | |
require 'scrubyt' | |
google_data = Scrubyt::Extractor.define do | |
fetch 'http://www.google.com/search?hl=en&q=ruby+-weight' | |
link_title "//a[@class='l']", :write_text => true do | |
link_url | |
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
require 'rubygems' | |
require 'webster' | |
@webster = Webster.new | |
puts @webster.random_word |
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 'rubygems' | |
require 'anemone' | |
Anemone.crawl("http://www.rubymatters.com/") do |anemone| | |
anemone.on_every_page do |page| | |
puts page.url | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'aws/s3' | |
require 'fileutils' | |
ACCESS_KEY_ID = "put yours here" | |
SECRET_ACCESS_KEY = "put yours here" |
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
/* Component */ | |
interface PolyColumn { | |
public void writeToInput(Map<String, String> inputCsvColumns, BondEx bond); | |
} | |
/* Composite */ | |
class CompositePolyColumn implements PolyColumn { |
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
/* Component */ | |
interface PolyColumn { | |
public void writeToInput(Map<String, String> inputCsvColumns, BondEx bond); | |
} | |
/* Composite */ | |
class CompositePolyColumn implements PolyColumn { |
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
<select id="getByCreatedAndModelType" resultMap="TrustResult" resultClass="Trust"> | |
select * from trkr_trust | |
where trunc(created) = trunc(#created#) | |
and model_id = #modelId# | |
<iterate property="types" prepend="AND" open="(" close=")" conjunction="OR"> | |
trust_type=#types[].id# | |
</iterate> | |
order by coupon, wala, intex_deal_name | |
</select> |
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
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript" language="javascript" src="jquery.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
$('#tbl tr td:nth-child(2)').each(function(i, e) { | |
var $td = $(this); | |
var prev = $td.closest('tr').prev().children('td:nth-child(2)').text(); | |
if (prev && ($td.text() != prev)) { |
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 'rubygems' | |
require 'g' | |
g 'foo' |
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
public void run() throws Exception { | |
setUp(); | |
while (run) { | |
try { | |
if (continueWithProcess()) { | |
if (!existingRequestsCleaned) { | |
cleanUpExistingRequests(); | |
} | |
prepare(); | |
poll(); |
OlderNewer