Skip to content

Instantly share code, notes, and snippets.

View seanhandley's full-sized avatar
🧀
Eating cheese

Sean Handley seanhandley

🧀
Eating cheese
View GitHub Profile
DELIMITER $$
CREATE PROCEDURE find_the_id(IN the_id INT)
BEGIN
SELECT name FROM items WHERE id = the_id;
END $$
DELIMITER ;
class Item < ActiveRecord::Base
def self.find_the_id(id)
items = Item.find_by_sql("call find_the_id(#{id})")
items[0]
end
end
# Get the current branch of the current git project
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
#Gemset
function parse_rvm_gemset {
gemset=$(rvm gemset name 2> /dev/null) || return
gemset=`echo -e ${gemset}` || return
request_string = %w(<?xml version="1.0" encoding="utf-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><TaxiSearch xmlns="http://resorttaxis.cmhosts.net/services/TaxiBookingAPI"><agent_guid>6a6d416d-d219-4005-87bc-515ee36becae</agent_guid><res_id>1</res_id><travel_date>09/02/2011 13:42</travel_date></TaxiSearch></env:Body></env:Envelope>)
receive_string = %w(<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><TaxiSearchResponse xmlns="http://resorttaxis.cmhosts.net/services/TaxiBookingAPI"><TaxiSearchResult><xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="en-
Scanning dependencies of target watchedit-cli
[ 89%] Building C object watchedit-cli/CMakeFiles/watchedit-cli.dir/main.c.o
Linking CXX executable watchedit-cli
Undefined symbols:
"_XML_ParseBuffer", referenced from:
_sd_domnode_fread in liblog4c.a(domnode-expat.o)
"_XML_SetUserData", referenced from:
_sd_domnode_read in liblog4c.a(domnode-expat.o)
_sd_domnode_fread in liblog4c.a(domnode-expat.o)
"_XML_SetStartElementHandler", referenced from:
alpha12: She described you as the most dangerous man she's ever met.
br56: I guess that could be understandable
alpha12: I think driving her around at 90mph might've freaked her out
br56: haha, no it's because I accidentally ran her over once
james frost 11:17
yesterday I was texting dave and mentioned 'elmo and fran'
17:11
only, it came out as 'Lemonade Frank'
17:12
sean 11:17
haha
17:21
awesome

Big Four Set List

Anthrax

  1. Caught in a Mosh
  2. Madhouse
  3. Antisocial
  4. Indians
  5. Fight 'Em 'til You Can't
  6. Only

England

  • Bath
  • Birmingham
  • Bradford
  • Brighton
  • Bristol
  • Cambridge
  • Canterbury
  • Carlisle
  • Chester
ruby-1.9.2-head :015 > account = Esendex::Account.new("EX1337", "user@foo.com", "bar")
=> #<Esendex::Account:0x00000102ef4540 @account_reference="EX1337", @username="user@foo.com", @password="leedshack", @connection=#<Nestful::Connection:0x00000102ef44f0 @password="bar", @user="halfcubeuk+txtvia@gmail.com", @uri_parser=#<URI::Parser:0x00000102ef44a0>, @site=#<URI::HTTP:0x00000102ee5720 URL:http://api.esendex.com>, @format=#<Nestful::Formats::XmlFormat:0x00000102ef44c8>, @auth_type=:basic, @default_header={}>, @messages_remaining=75>
ruby-1.9.2-head :016 > batch_id = account.send_message(m)
Esendex::ApiError: #<Esendex::ApiError:0x00000102e64710>
from /Users/sean.handley/.rvm/gems/ruby-1.9.2-head@txtvia/gems/esendex-0.1.1/lib/esendex/account.rb:45:in `rescue in send_messages'
from /Users/sean.handley/.rvm/gems/ruby-1.9.2-head@txtvia/gems/esendex-0.1.1/lib/esendex/account.rb:40:in `send_messages'
from /Users/sean.handley/.rvm/gems/ruby-1.9.2-head@txtvia/gems/esendex-0.1.1/lib/esendex/account.rb:33:in `send