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 'date' | |
require 'time' | |
# | |
# General example, these would be types that would exist in DBI proper | |
# | |
module DBI | |
class DBI::Type | |
def self.parse(obj, type=nil, dbh=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
set nocp | |
set autoindent | |
set smartindent | |
set statusline=%F\ \[%M%R\] | |
set laststatus=2 | |
set titlestring=vim:\ %F\ \[%M%R\] | |
set title | |
set number | |
set hls | |
set noswf |
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
set nocp | |
set autoindent | |
set smartindent | |
set statusline=%F\ \[%M%R\] | |
set laststatus=2 | |
set titlestring=vim:\ %F\ \[%M%R\] | |
set title | |
set number | |
set hls | |
set noswf |
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
# $Id$ | |
$:.push 'lib' | |
require 'rake/testtask' | |
require 'rake/packagetask' | |
require 'rake/gempackagetask' | |
require 'rake/rdoctask' | |
require 'fileutils' | |
require 'gk-lib' |
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
Mail relay testing | |
Connecting to christhelinuxguy.com for anonymous test ... | |
<<< 220 neural.christhelinuxguy.com ESMTP Postfix (Debian/GNU) | |
>>> HELO www.abuse.net | |
<<< 250 neural.christhelinuxguy.com | |
Relay test 1 | |
>>> RSET | |
<<< 250 2.0.0 Ok | |
>>> MAIL FROM:<[email protected]> |
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
select * from candidate_versions where updated_at between 'date1' and 'date2' and candidate_id=? union select max(updated_at) from candidate_versions where updated_at < 'date1' and candidate_id=? and rownum = 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
a = [{ :one => 1, :two => 2 }, { :one => 1, :two => 2 }, { :one => 2, :two => 1 }, { :one => 3, :two => 2 }] | |
def uniq(ary) | |
b = [] | |
c = ary.dup | |
while c.length > 1 do | |
d = c.pop | |
found = false | |
c.each do |e| |
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
################################################################ | |
# | |
# titlebar.rb - context-sensitive xterm title manipulation | |
# | |
# based off of titlebar.pl by erikh which is does the same thing | |
# | |
# By Erik Hollensbe <[email protected]> | |
# | |
################################################################ | |
# |
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
################################################################################ | |
# | |
# notify.pl - use libnotify to work like growl | |
# | |
# By Erik Hollensbe <[email protected]> | |
# | |
# usage: | |
# | |
# See the CALLBACK_MAP below? Those are the defined message types. | |
# |
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
function process_template(url, id, data) { | |
$.ajax({ | |
url: url, | |
data: data, | |
success: function(msg, ts) { $(id).empty(); $(id).append(msg); } | |
}); | |
} | |
function process_json(push_object) { | |
if (push_object && push_object.url && push_object.data && push_object.id) |
OlderNewer