- http://flickr.com
- http://cnn.com
- http://letsfreckle.com # You need to log 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
require 'mechanize' | |
require 'yaml' | |
$results = [] | |
def find(a, link) | |
puts "find started on #{link}" | |
a.get link do |page| | |
page.search(:css, ".blog-post").each do |post| | |
h2 = post.search(:css, "h2").first |
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
rails_root = "/data/github/current" | |
20.times do |num| | |
God.watch do |w| | |
w.name = "dj-#{num}" | |
w.group = 'dj' | |
w.interval = 30.seconds | |
w.start = "rake -f #{rails_root}/Rakefile production jobs:work" | |
w.uid = 'git' |
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
;; Automatically add, commit, and push when files change. | |
(defvar autocommit-dir-set '() | |
"Set of directories for which there is a pending timer job") | |
(defun autocommit-schedule-commit (dn) | |
"Schedule an autocommit (and push) if one is not already scheduled for the given dir." | |
(if (null (member dn autocommit-dir-set)) | |
(progn | |
(run-with-idle-timer |
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
<!-- http://emilsblog.lerch.org/2009/07/javascript-hacks-using-xhr-to-load.html --> | |
<html5> | |
<head> | |
<script language="vbscript"> | |
Function BinaryArrayToAscCSV( aBytes ) | |
Dim j, sOutput | |
sOutput = "BinaryArrayToAscCSV" | |
For j = 1 to LenB(aBytes) | |
sOutput= sOutput & AscB( MidB(aBytes,j,1) ) |
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
puts "What is the amount due?" | |
total = gets.chomp.to_f | |
puts "What is the amount tendered?" | |
paid = gets.chomp.to_f | |
if paid < total | |
puts "WARNING: Customer still owes $#{format("%.2f", total-paid)}" | |
puts Time.now | |
elsif paid > total |
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 JobSchedule | |
# External interface for calling the service | |
def self.call(object_id, opts={}) | |
if perform_asynchronously? | |
Delayed::Job.enqueue(EnqueuedJob.new(name, object_id, opts)) | |
else | |
perform(object_id, opts) | |
end | |
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
From c6966ade4141e695159b3b38bdc60a7a82d30775 Mon Sep 17 00:00:00 2001 | |
From: Pieter de Bie <pdebie@ai.rug.nl> | |
Date: Thu, 25 Sep 2008 22:25:46 +0200 | |
Subject: [PATCH] HistoryView: Add a method to put a commit online | |
--- | |
GitX.xcodeproj/project.pbxproj | 4 +++ | |
Images/spinner.gif | Bin 0 -> 1924 bytes | |
PBGitCommit.h | 2 + | |
PBGitCommit.m | 9 +++++++ |
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/ruby | |
## | |
# Remove any duplicate tracks in iTunes | |
# PJ Hyett was here 11/2008 | |
framework "Cocoa" | |
framework "ScriptingBridge" | |
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes") |
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 | |
# | |
# Git log to iCalendar | |
# | |
# Written by Dmitry Chestnykh, 5 Aug 2008 | |
# Public domain | |
# | |
# Usage: | |
# | |
# cd git-repo |
NewerOlder