Skip to content

Instantly share code, notes, and snippets.

View bjeanes's full-sized avatar
🕊️

Bo Jeanes bjeanes

🕊️
View GitHub Profile
@bjeanes
bjeanes / default.rb
Created August 14, 2008 04:54
wsdl2ruby.rb generated SOAP driver for ABN API
require 'xsd/qname'
# {http://abr.business.gov.au/ABRXMLSearchRPC/}Payload
# request - ExternalRequest
# response - Response
class Payload
attr_accessor :request
attr_accessor :response
def initialize(request = nil, response = nil)
alias profileme="history | awk '{print \$2}' | awk 'BEGIN{FS=\"|\"}{print \$1}' | sort | uniq -c | sort -n | tail -n 20 | sort -nr"
####
bne-developer:~ bjeanes$ profileme
612 git # I think I like git
230 cd
193 dscl
153 ssh
131 mate
-- I spent all of yesterday re-writing queries for a government project
-- because their production database runs MySQL v3 and they won't upgrade.
-- MySQL 3 sucks and doesn't even support sub-queries. This is an example of
-- how I wasted what little time I have left:
-- The original:
SELECT p1. * , (
SELECT COUNT( `id` )
FROM `pages` p2
@bjeanes
bjeanes / README.markdown
Created September 4, 2008 03:39
A completely up-to-date Cap2 deployment recipe for Media Temple Grid Server + Git

Media Temple Capistrano Deployment Recipe

With GitHub

See comments in the files for explanation. This works flawlessly for me on MediaTemple + Git(Hub).

To use:

On the Server

  1. SSH into your MediaTemple server.
  2. Put your public key into ~/.ssh/authorized_keys2 with mode 0600
@bjeanes
bjeanes / environment.rb
Created October 1, 2008 02:18 — forked from mislav/_note.md
PostgreSQL version of GitConf to manage branched databases
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
require 'git_conf'
Rails::Initializer.run(:process, GitConf.new) do |config|
# ...
end
# Oh. My. God. Love.
alias my_server='screen -R -d -m -S my_server ssh my_user@my.server'
# With aliases like this in my .bashrc I can just type `my_server` into any terminal and be presented
# with that server connection. With enough aliases like this it means that from any terminal, I can just
# type `my_server` again and it will disconnect that session from the other window and into my current one.
# screen(1) kicks. ass.
Bos-MacBook-Pro:integrity bjeanes (master)$ rake
(in /Users/bjeanes/Projects/Clones/integrity)
rm -r coverage
Loaded suite /usr/bin/rcov
Started
..................................E.......
Finished in 3.123474 seconds.
1) Error:
test_project_when_building_a_build_sends_notifications_with_all_registered_notifiers(Test::Unit::TestCase::TestProject20863500::TestWhenBuildingABuild20844450):
abstract (1.0.0)
actionmailer (2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.4, 1.3.6)
actionpack (2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.4, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.4, 1.15.6)
activeresource (2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.4)
activesupport (2.2.2, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.4, 1.4.4)
acts_as_ferret (0.4.1)
addressable (2.0.1, 2.0.0, 1.0.4)
alter-ego (1.0.0)
@bjeanes
bjeanes / gist:38889
Created December 22, 2008 04:41 — forked from drnic/gist:38843
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
<VirtualHost *:80>
ServerName mingle.mocra.com
ServerAlias elevensoftmingle.selfip.com
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>