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
Dim SessionState(127) As Integer | |
Dim y(127) As String | |
Dim h As Integer | |
Private Sub about_Click(Index As Integer) | |
frmAbout.Show | |
End Sub | |
Private Sub Clearlog_Click(Index As Integer) |
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
### Keybase proof | |
I hereby claim: | |
* I am pjdavis on github. | |
* I am pjdavis (https://keybase.io/pjdavis) on keybase. | |
* I have a public key whose fingerprint is B82A 60F6 DFE1 6DD5 C8CF 6807 8C37 BC25 9FAC DBEE | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
#current for modpack v 4.16 2011 apr 20 | |
# move to the tmp directory | |
cd /tmp | |
#save the full path to the file | |
curl -C - http://dl.dropbox.com/u/19090066/minecraft/zombe\'s_modpack-v5.1_MC.beta.1.9.pre2.zip -o zombie.zip | |
ZIPFILE=`pwd`/zombie.zip | |
read ZIPFILE | |
#make a directory to hold the files from the zip 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
#!/bin/bash | |
if [ -e "/Applications/Chromium.app/Contents/Info.plist" ];then | |
chk=`echo "1"` | |
else | |
chk=`echo "0"` | |
fi | |
if [ "$chk" -eq "1" ];then | |
old=`/usr/libexec/PlistBuddy -c 'Print :SVNRevision' /Applications/Chromium.app/Contents/Info.plist` | |
else | |
old=`echo "0"` |
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
What version of bundler you are using | |
Bundler version 1.0.13 | |
What version of Ruby you are using | |
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02 | |
Whether you are using RVM, and if so what version | |
no | |
Your Gemfile |
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 'tempfile' | |
require 'base64' | |
require 'zlib' | |
def read(file, bytes, unpack) | |
return file.read(bytes).unpack(unpack).first | |
end | |
f = File.open(ARGV.first) |
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
#Problem: I have a self referential join from Page<->Page through links. When page is updated, | |
# friendly_id runs reflect_on_all_associations to get the associations and see if they have | |
# friendly id's that need to be updated. When this runs, i get Stack Level Too Deep. I think | |
# it's because of how my self-referential join is set up, but i'm not sure how else to set | |
# it up. | |
create_table "revisions", :force => true do |t| | |
t.integer "page_id" | |
t.text "content" |
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 "hpricot" | |
require "open-uri" | |
url = "http://feeds.feedburner.com/RubyHoedown2008-Confreaks" | |
(Hpricot(open url)/:enclosure).map {|x| x.attributes["url"]}.uniq.each do |vid| | |
File.exist?(vid.split("/").last) ? next : `wget #{vid}` |
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 'faker' | |
define_models do | |
model Site do | |
20.times do | |
# Fairly sure this isn't the right Faker syntax but oh well | |
stub :title => Faker::Company.name | |
end | |
end | |
end |
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
class Email | |
@@blacklist = Array.new | |
@@reg = /\A([-a-z0-9]+[\w\.\-\+]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i | |
def initialize(mailbox, host) | |
@host = host | |
@address = "#{mailbox}@#{host}" | |
end | |