Skip to content

Instantly share code, notes, and snippets.

View dsci's full-sized avatar

Daniel Schmidt dsci

  • Leipzig, Germany
View GitHub Profile
class XX < ActiveRecord::Base
self.abstract_class = true
establish_connection :db_key
end
Exception sending context initialized event to listener instance of class org.jruby.rack.rails.RailsServletContextListener
java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class org.jruby.RubyObject$ObjectMethods$s_method_0_0$RUBYINVOKER$intialize)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1854)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jruby.internal.runtime.methods.InvocationMethodFactory.tryClass(InvocationMethodFactory.java:1109)
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethodClass(InvocationMethodFactory.java:714)
at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethod(InvocationMethodFactory.java:677)
@dsci
dsci / Quotes.md
Last active September 4, 2015 04:35

Wertvolles,Nicht wertvolles, hängen gebliebenes

Ohne Musik wäre das Leben ein Irrtum - hat man bemerkt dass die Musik den Geist frei macht, dem Gedanken Flügel gibt? -- Musik ist das von selber Ertönen der tiefsten Einsamkeit.

(Grabnebelfürsten)

We didn't receive any messages and Captain Blackadder definitely did not shoot the delicious plump breasted pigeon, Sir.

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@dsci
dsci / plugin_loader.rb
Created August 30, 2011 13:42 — forked from robhurring/plugin_loader.rb
Simple way to load Rails plugins in Sinatra
# Simple bootloader for Rails plugins in Sinatra
# This checkes the +plugin_folder+ for plugin-like bundles. For each folder it finds it will do:
# If the +lib+ folder exists: add it to our load path
# If a +init.rb+ file exists: require it
# Not very robust but it is lightweight for loading simple rails plugins
class PluginLoader
attr_reader :plugin_folder
def initialize(plugin_folder)
@plugin_folder = plugin_folder
@dsci
dsci / gist:1313822
Created October 25, 2011 18:49
test
def foo(*args,&data)
data.call
end
@dsci
dsci / cherry_pick.sh
Created October 26, 2011 11:01
git sheet
git cherry-pick commit_hash
@dsci
dsci / async.coffee
Created November 2, 2011 12:07
Asynchronous testing with CoffeeScript and Jasmine
describe 'convert', ->
sampleCollection = Ext.create('my.store.Shoes')
answer = null
callback = (records,operation,success) ->
answer = records
return
sampleCollection.load(callback)
waitsFor ->
answer
@dsci
dsci / gist:1347672
Created November 8, 2011 12:52
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@dsci
dsci / gist:1347914
Created November 8, 2011 14:43
Git stash overview
# put current stuff to the stash
git stash
# list items of your stash
git stash list
# apply the last changes from your stash
git stash apply
# apply specific changes from your stash ( get which one you want from git stash list )