Skip to content

Instantly share code, notes, and snippets.

View patrickmcelwee's full-sized avatar

Patrick McElwee patrickmcelwee

View GitHub Profile
@patrickmcelwee
patrickmcelwee / slush-default-login.png
Last active August 11, 2016 19:35
slush-tutorial-options.png
slush-default-login.png
//...
public class OrganizationServiceServlet extends VitroHttpServlet {
//...
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
super.doGet(req, resp);
@patrickmcelwee
patrickmcelwee / gist:3fe106a925749568afd4
Created January 8, 2015 18:56
script to trigger Vivo rebuild
#!/bin/sh
wget -q --cookies=on --keep-session-cookies --save-cookies=/srv/web/apps/vivo/shared/cookie.txt 'http://localhost:8080/authenticate?loginName=USERNAME@SCHOOL.edu&loginPassword=PASSWORD&loginForm=1'
wget -q --referer=http://first_page --cookies=on --load-cookies=/srv/web/apps/vivo/shared/cookie.txt --keep-session-cookies --save-cookies=/srv/web/apps/vivo/shared/cookie.txt --post-data "rebuild=Rebuild" http://localhost:8080/SearchIndex
rm /srv/web/apps/vivo/shared/cookie.txt
@patrickmcelwee
patrickmcelwee / image.rb
Created June 19, 2014 17:57
Automated Vivo Image Uploads
require 'vivo_mapper/resource'
require 'app/maps/image_map'
module VivoMapper
class Image < Resource
map_with(ImageMap)
attr_reader :type, :download_location, :thumb, :content, :image
def initialize(image,type='image')

Meg and Patrick McElwee's Plan for the Birth of Sadie

Winter 2013-2014

Hypnobabies

We took the hypnobabies course and practiced for our two previous births. We plan to practice it for this one, with Patrick as Meg's primary coach. However, any language is acceptable. Meg is not very sensitive about that.

Positions, etc

Meg has preferred being up and active for previous births, including a ball. We would like to try the tub when it is time to push, if that feels right at the time.

java_import 'com.hp.hpl.jena.ontology.OntModelSpec'
java_import 'com.hp.hpl.jena.rdf.model.ModelFactory'
java_import 'com.hp.hpl.jena.datatypes.xsd.XSDDatatype'
require 'vivo_mapper/rdf_prefixes'
module VivoMapper
class Mapper
include RdfPrefixes
1) BillingIntegration::Skrill::QuickCheckout redirect_url should return url
Failure/Error: payment_method.redirect_url(order).should == "#{ActiveMerchant::Billing::Skrill.new.service_url}?sid=123"
expected: "https://www.moneybookers.com/app/payment.pl?sid=123"
got: "https://www.moneybookers.com/app/payment.pl?server=test&test_mode=true&merchant_id=&language=EN&currency=EUR&payment_options=ACC&recipient_description=Spree+Demo+Site&payment_methods=ACC&detail1_text=R150052044&detail1_description=Order+Number%3A&pay_from_email=marco%40carrollkerluke.name&firstname=John&lastname=Doe&address=10+Lovely+Street&address2=Northwest&phone_number=123-456-7890&city=Herndon&postal_code=20170&state=AL&country=United+States&hide_login=1&merchant_fields=platform&platform=Spree" (using ==)
# ./spec/models/billing_integration/skrill_spec.rb:10:in `block (3 levels) in <top (required)>'
2) CheckoutController during payment selection on checkout should setup a purchase transaction and redirect
F