Skip to content

Instantly share code, notes, and snippets.

View sampierson's full-sized avatar

Sam Pierson sampierson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sampierson on github.
  • I am sampierson (https://keybase.io/sampierson) on keybase.
  • I have a public key ASDKezGttQXok9MywkiMT2DbcnpazlkbFIR5gHbsGE4OHQo

To claim this, I am signing this object:

@sampierson
sampierson / gist:3364554
Created August 15, 2012 23:08
How to create a bunch of posters in a competition
# First, create a competition and category
require 'factory_girl'
require 'faker'
Dir[Rails.root.join 'spec/factories/**/*.rb'].each {|f| require f}
(1..10).each { FactoryGirl.create(:poster_published) }
Poster.all.each { |p| p.authors = [p.submitter] }
@sampierson
sampierson / gist:750381
Created December 21, 2010 19:03
java.lang.NullPointerException attempting to get status for a datasource
[java] java.lang.NullPointerException
[java] at com.lucid.admin.collection.AdminScheduler.getStatus(AdminScheduler.java:174)
[java] at com.lucid.api.DataSourcesStatusResource.retrieve(DataSourcesStatusResource.java:56)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at org.restlet.resource.ServerResource.doHandle(ServerResource.java:449)
[java] at org.restlet.resource.ServerResource.get(ServerResource.java:616)
[java] at org.restlet.resource.ServerResource.doHandle(ServerResource.java:378)