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
var i = 0; | |
var slide; | |
function SlideShow() { | |
Effect.Fade($( slide[i] ), { duration:5 }); | |
i++; | |
if (i == slide.length) i = 0; | |
Effect.Appear($( slide[i] ), { duration:5, afterFinish: function () { SlideShow(); } }); | |
} |
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
$(document).ready(function() { | |
var $tabs = $('#tabs').tabs(); | |
$('.next').click(function() { var $tabs = $('#tabs').tabs(); | |
var selected = $tabs.tabs('option', 'selected'); | |
$tabs.tabs('select', selected + 1); return false; | |
}) | |
$('.previous').click(function() { var $tabs = $('#tabs').tabs(); | |
var selected = $tabs.tabs('option', 'selected'); | |
$tabs.tabs('select', selected - 1); | |
return false; |
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
#so very stolen from http://gist.github.com/145676 | |
require 'open-uri' | |
def download(from, to = from.split("/").last) | |
#run "curl -s -L #{from} > #{to}" | |
file to, open(from).read | |
rescue | |
puts "Can't get #{from} - Internet down?" | |
exit! | |
end |
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
# Nicholas Fine | |
# [email protected] | |
# This is just my general collection of useful methods, algorithms, etc. | |
############################################################################## | |
# Get the date for the nth weekday of a given month and year. Call date_for_nth_weekday({2009,3,:monday,3}) to | |
# get the third monday of april in 2009 | |
def date_for_nth_weekday(h={:year, :month, :week_day, :nth}) | |
days_of_week = {:sunday => 0, :monday => 1, :tuesday => 2, :wednesday => 3, :thursday => 4, :friday => 5, :saturday => 6} | |
twd = days_of_week[h[:week_day]] |
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
[2010-04-14 22:46:09 -0400] Getting customer.. | |
[2010-04-14 22:46:09 -0400] Getting products.. | |
not matched 5102 | |
[2010-04-14 22:46:23 -0400] Getting customer.. | |
[2010-04-14 22:46:23 -0400] Getting products.. | |
not matched 5103 | |
[2010-04-14 22:46:36 -0400] Getting customer.. | |
[2010-04-14 22:46:36 -0400] Getting products.. | |
not matched 5104 | |
[2010-04-14 22:46:49 -0400] Getting customer.. |
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
require 'rubygems' | |
require 'active_support' | |
require 'open-uri' | |
class GoogleWeather | |
WEATHER_URL = "http://www.google.com/ig/api?weather=35205" | |
attr_accessor :weather_information | |
def initialize(url=WEATHER_URL) |
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
require 'rubygems' | |
require 'active_support' | |
require 'ruby-debug' | |
class WorkorderCreator | |
attr_accessor :category, :message, :data_file | |
def initialize(args=[]) | |
@data_file = File.join("/home/ndfine/code/misc/work_order", "#{Time.now.strftime('%Y_%m_%d')}_work_orders.csv") | |
@category = args.last |
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
require 'rubygems' | |
require 'active_support' | |
require 'excelsior' | |
class WorkorderList | |
attr_accessor :data_file, :data, :workorders | |
def initialize(day=Time.now) | |
@data_file = File.join('/home/ndfine/code/misc/work_order', "#{day.strftime('%Y_%m_%d')}_work_orders.csv") |
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
gitcommit () { git commit -m"$1"; ruby /home/ndfine/code/misc/workorder_creator.rb "$1" "$2"; } | |
workorders () { ruby /home/ndfine/code/misc/workorder_list.rb $1; } | |
addworkorder () { ruby /home/ndfine/code/misc/workorder_creator.rb "$1" "$2"; } |
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 SyncPlsTellerIds | |
attr_reader :updated, :not_found | |
def initialize | |
@updated = [] | |
@not_found = [] | |
end | |
def run | |
tellers_to_update.each do |t| |
OlderNewer