Skip to content

Instantly share code, notes, and snippets.

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)
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
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
# $Id$
$:.push 'lib'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
require 'gk-lib'
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:<spamtest@abuse.net>
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;
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|
################################################################
#
# titlebar.rb - context-sensitive xterm title manipulation
#
# based off of titlebar.pl by erikh which is does the same thing
#
# By Erik Hollensbe <erik@hollensbe.org>
#
################################################################
#
################################################################################
#
# notify.pl - use libnotify to work like growl
#
# By Erik Hollensbe <erik@hollensbe.org>
#
# usage:
#
# See the CALLBACK_MAP below? Those are the defined message types.
#
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)