My Recent Pastes (10 and counting)
All Pasties (over 10 and counting)
Below are summaries of the 10 most recent pasties by Tim Lucas.
July 31, 2007
8:04AM EDT
by Tim Lucas
View more (211 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby
def snom_phone_info(info_page_html)
Hash[*info_page_html.scan(%r{<TD class="normalText">(.*?):</TD><td class="normalText">(.*?)</td>}).flatten]
end
|
July 12, 2007
9:49PM EDT
by Tim Lucas
View more (22 lines)
1 2 3 4 5 |
# Normalise your URLs, yo: # http://www.standardzilla.com/2007/07/09/dont-forget-your-trailing-slash/ TLD_LENGTH = 1 |
July 12, 2007
8:44PM EDT
by Tim Lucas
View more (9 lines)
1 2 3 4 5 |
function parse(unsemantic_poo) {
var regex = new RegExp(pattern, "mig");
for (var i = 0; i < maxItems; i++) {
var match = regex.exec(unsemantic_poo);
if (match) {
|
July 03, 2007
11:32PM EDT
by Tim Lucas
View more (12 lines)
1 2 3 4 5 |
namespace :db do
namespace :sessions do
desc "Clear database-stored sessions older than two weeks"
task :clear => :environment do
CGI::Session::ActiveRecordStore::Session.delete_all ["updated_at < ?", 2.weeks.ago ]
|
July 03, 2007
1:26AM EDT
by Tim Lucas
View more (21 lines)
1 2 3 4 5 |
desc "Test the core plugins and the main application"
task :the_lot do
had_errors = false
DEFAULT_PLUGINS.each do |p|
|
May 23, 2007
10:34PM EDT
by Tim Lucas
View more (31 lines)
1 2 3 4 5 |
<!DOCTYPE html PUBLIC "-//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">
<head>
|
May 23, 2007
10:33PM EDT
by Tim Lucas
1 |
background: #b2b2b2 url(data:image/gif;base64,R0lGODlhDgMeAMQAALKysp+fn5aWlpiYmJ2dnaioqKampqqqqq6urq2trbCwsKGhoaSkpKKioqenp5qamqurq56enq+vr5ubm6ysrKmpqbOzs6WlpbGxsf///wAAAAAAAAAAAAAAAAAAAAAAACwAAAAADgMeAAAF/yAAKBKSQEfhGEyzBBExPcMgCFmu73zv/8CgcEgsGo/IpHLJbDqf0Kh0Sq1ar9isdsvF3mqPCSESWDQYBkfhAEkgJAoRwCIHYBQmyqFSMFxaLwEEBF2FhoeIiYqLjI2Oj5CRkpM/gwFlZxcGBRUHFG4KGHV0IiQmKCosLjAyNDY4lLGys7S1tre4ubq7TF8DYWOYaGpsbnB1picpK4CsMzU3vNLT1NXW19jZ2la+wGRmw2ttb3EipCJ3eXt9f6uChNvx8vP09fb3+EaWwpqcnqCi5JxLhorZqhjPXuVbyLChw4cQI07pJubbmTTijJUrVUJZqmYIXUWTSLKkyZMoU//mohgMHMZi5ATWSZdADx8/zd6p3Mmzp8+fQPURuASuX6dPCEKNkkNwmaoXIaHBCkq1qtWrWOOxtBgO5jGmHQs+dSZyatazaNOqXWtoq7CX477OmYmn5jqc7gax3cu3r9+/PvYV3XQU4FKOp5yCbCUVsOPHkCPvdOuSWNyNI8IqPshYoeTPoEOL1kb5omWNMuXQtMkup97RsGPLng1JcCbC/5IGNAc28UfOCUfSHk68uPEnpbteRqb5N9TOwo9Ln059enK4qHmrrssab6DX1cOLHw/aNgOjuZWmzuzb4PPgZsnLn0//7PXTMXt7dE+2cf3/AAY4mQBgVPQWfnKdYwepd3e18x08AkYo4YT4mIceUuppx95+Y0XlGYUghijiNPdllB9iHC4G34gstugiJSV6tZGCqzXoGoQv5qjjjlpYiBuGu82FolgqlsXjkUgm2USMy+lHJHBGKinllFTywGR2QqLD4E0OXgJelWCGqaOP/gB52IZPvhelmGy2GeKVJ6K5mZr+uWnnnf/BmSBd6nB5I56ABioemYXpdmZTzvX3oaCMNjqbnuWEAAA7) top center repeat-y; |
May 23, 2007
10:27PM EDT
by Tim Lucas
View more (39 lines)
1 2 3 4 5 |
<!DOCTYPE html PUBLIC "-//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">
<head>
|
February 20, 2007
10:17AM EDT
by Tim Lucas
1 2 3 4 5 |
class TicketNotificationTest < Test::Unit::TestCase
def test_should_send_notification_after_creation_of_new_ticket
...
end
end
|
Pastie