Public Gists by peterc

gist: 210008 A horribly scrappy solution...
Gravatar
Wed Oct 14 04:58:59 -0700 2009
1
2
3
# A horribly scrappy "just for fun" entry into Satish Talim's latest Ruby
# challenge. Didn't want to use any libraries, etc, just bashed at it true 1980s style!
# It makes the assumption, as was raised in several comments, that the first time in
Gravatar
Sat Oct 03 16:41:20 -0700 2009
1
2
3
$ gem push pkg/choice-0.1.4.gem
Pushing gem to Gemcutter...
You do not have permission to push to this gem.
gist: 198184 Create and sync a new git r...
Gravatar
Wed Sep 30 08:35:33 -0700 2009
1
2
3
# Create a new git repository on Dreamhost
# Function tweaked from that found at http://craigjolicoeur.com/blog/hosting-git-repositories-on-dreamhost
#
Gravatar
Mon Aug 24 18:58:33 -0700 2009
1
2
3
Poor Man's Deploy
=================
 
gist: 113226 Rake task to automatically ...
Gravatar
Sun May 17 16:55:28 -0700 2009
1
2
3
# Rake task to automatically run something (i.e. specs) when code files are changed
# By Peter Çoopér
#
Gravatar
Mon May 11 14:04:20 -0700 2009
1
2
3
require 'rubygems'
 
if RUBY_VERSION >= "1.9.0"
Gravatar
Thu Apr 09 17:40:20 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
require 'erb'
Gravatar
Mon Apr 06 00:48:16 -0700 2009
1
2
3
# Get the 50/20 week means of markets
# Sloppy ass coding that was a quick hack one night many moons ago..
# Easily changed to do 50/20 days instead, not posting that one :)
Gravatar
Sat Apr 04 18:36:54 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# runas - Run another program under the privileges of a specified user and group.
Gravatar
Sat Apr 04 12:02:02 -0700 2009
1
2
3
# Basic Ruby event driven "chat" server
# Heavily based on example code at http://rev.rubyforge.org/rdoc/
# Works on Ruby 1.9.1 - not tested on 1.8.
gist: 90077 urlmonitor - print out the ...
Gravatar
Fri Apr 03 18:30:45 -0700 2009
1
2
3
# urlmonitor - print out the URLs requested system wide on the main network interface
 
# Accept a network interface name as an optional argument
Gravatar
Fri Apr 03 17:29:06 -0700 2009
1
2
3
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
Gravatar
Fri Apr 03 10:56:34 -0700 2009
1
2
3
# Test a Wordpress blog for compliance with /feed, /feed/ and
# similar requests from normal Feed clients and FeedBurner
 
Gravatar
Mon Mar 23 09:09:49 -0700 2009
1
2
3
#!/usr/bin/ruby
 
# Fetch Jakob Nielsen's Alertbox and turn it into a basic RSS feed
Gravatar
Wed Feb 25 07:00:48 -0800 2009
1
2
3
#!/bin/bash
 
REMOTE_HOST='whatever'
gist: 63893 Check if a domain is availa...
Gravatar
Fri Feb 13 05:30:12 -0800 2009
1
2
3
#!/bin/bash
 
# domainavailable
gist: 60386 Quick and messy YQL client
Gravatar
Sun Feb 08 05:49:10 -0800 2009
1
2
3
require 'nokogiri'
require 'open-uri'
require 'cgi'
Gravatar
Fri Feb 06 02:57:48 -0800 2009
1
2
3
global
        maxconn 1024
        chroot /var/lib/haproxy
Gravatar
Fri Jan 30 03:20:41 -0800 2009
1
2
3
SINATRA 0.9.x on DREAMHOST (using Rack 0.4) EXPERIMENT
 
File structure is:
Gravatar
Wed Jan 21 01:49:22 -0800 2009
1
2
3
#!/usr/bin/perl -w
 
# start-memcached