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
# -*- mode: ruby; coding: utf-8 -*- | |
# | |
# Require: | |
# * xoxo gem | |
# * lftp binary | |
# * linkchecker binary | |
# * html tidy binary | |
# * svn or hg or git | |
# * htpasswd binary |
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 | |
require 'rubygems' | |
require 'nokogiri' | |
# | |
# RTM `printplanner' scraper | |
# | |
#TARGET = 'http://www.rememberthemilk.com/printplanner/USER/' |
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
def mechanize_page( uri, base_uri = nil ) | |
require 'kconv' | |
require 'rubygems' | |
require 'mechanize' | |
require 'hpricot' | |
WWW::Mechanize.html_parser = Hpricot | |
if ( URI( uri ).is_a?( URI::HTTP ) ) | |
WWW::Mechanize.new.get( uri ) | |
elsif ( File.exist?( uri ) ) | |
base_uri = 'http://example.com/' if base_uri.nil? |
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
@-moz-document url-prefix("http://twitter.com/") { | |
body { | |
font-size: x-small !important; | |
} | |
div#new_results_notification { | |
display: none !important; | |
} | |
ol.statuses { | |
font-size: small !important; | |
} |
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
<?php | |
/** | |
* `rm -r` command, PHP implementation | |
* | |
* @since 2009-12-20 | |
* @license two-clause BSD | |
*/ | |
function rm_r( $path ) { | |
if ( is_dir( $path ) and $dh = opendir( $path ) ) { | |
while ( ($entry = readdir( $dh )) !== 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
OK | |
RECEIVE: PASS | |
RECEIVE: NICK wtnabe maxlimit=30 | |
RECEIVE: USER wtnabe 8 * :wtnabe | |
----- | |
NG |
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
diff --git a/examples/tig.rb b/examples/tig.rb | |
index c828a5f..9d69bef 100755 | |
--- a/examples/tig.rb | |
+++ b/examples/tig.rb | |
@@ -2148,7 +2148,7 @@ class TwitterIrcGateway < Net::IRC::Server::Session | |
if uri.is_a? URI::HTTPS | |
http.use_ssl = true | |
http.cert_store = @cert_store | |
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE |
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
# -*- mode: ruby -*- | |
God.watch do |w| | |
w.name = 'wig.rb' | |
w.interval = 5.seconds | |
w.start = 'wig.rb -h 127.0.0.1' | |
# delay wig.rb | |
w.autostart = false | |
w.behavior( :clean_pid_file ) |
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
# for paper | |
convert INFILE -size SRC_SIZE -scale TARGET_SIZE -density 350x350 -units PixelsPerInch OUTFILE |