Skip to content

Instantly share code, notes, and snippets.

View dpetersen's full-sized avatar

Don Petersen dpetersen

View GitHub Profile
Loaded suite /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
Started
.................................................................................................................................FF...F..F...FFF....................
Finished in 42.712434 seconds.
1) Failure:
test_breadcrumb_not_search(Site::RecipesControllerTest)
[/Users/dpetersen/rails/butterball/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb:299:in `assert_select'
./test/functional/site/recipes_controller_test.rb:310:in `test_breadcrumb_not_search'
/Users/dpetersen/rails/butterball/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
#!/usr/bin/ruby
RSS_URL = "http://www.971freefm.com/pages/podcast/43.rss"
require 'rss'
require 'open-uri'
require 'rubygems'
require 'activesupport'
require 'chronic'
require 'tempfile'
#!/bin/bash
NUMBER=`curl "http://www.mail-archive.com/ctrl@listserv.aol.com/msg30901.html" | grep -i "span" | wc -l`
echo $NUMBER
if [ $NUMBER -gt 0 ] ; then
osascript -e 'tell application "Finder"' -e 'activate' -e 'display dialog "Yo Dog!"' -e 'end tell'
fi
<html>
<head>
<script type="text/javascript" language="javascript" charset="utf-8">
//<![CDATA[
var test = "200px auto,100px, AUTO";
var result = test.replace(/(\w+)(?:\W+)/g, "$1 ");
alert(result);
//]]>
</script>
</head>
Day.create(:datestamp => Time.now.at_beginning_of_day)
# INSERT INTO "days" ("datestamp") VALUES('2009-02-15 06:00:00')
Day.find(:all, :conditions => { :datestamp => Time.now.at_beginning_of_day })
# SELECT * FROM "days" WHERE ("days"."datestamp" = '2009-02-15 00:00:00')
From e83c6d9e3ea21c3c55f20831bef5aa4390ef2e91 Mon Sep 17 00:00:00 2001
From: Don Petersen <don@donpetersen.net>
Date: Tue, 23 Jun 2009 19:28:42 -0500
Subject: [PATCH] Fixed a bug in the cookies class method that caused cookies to be
forgotten after the first request. Reported by David Turnbull.
---
lib/httparty.rb | 13 +++++++------
spec/httparty_spec.rb | 7 +++++++
2 files changed, 14 insertions(+), 6 deletions(-)
#!/bin/bash
cd ~/
rm -fR chef
mkdir chef
cd chef
git clone git://github.com/dpetersen/recipes.git
cp recipes/config/solo.rb ./
{
"networking": { "hostname": "hov", "fqdn": "hov.local" },
"groups": { "hov": { "gid": 5000 } },
"users": { "hov": { "password": "", "id": 5000, "groups": [ "hov" ] } },
"active_users": [ "hov" ],
"active_groups": [],
"authorization": { "sudo": { "passwordless_users": [ "hov", "factory" ] } },
[core]
excludesfile = /Users/donpetersen/.gitignore