Skip to content

Instantly share code, notes, and snippets.

View samueldana's full-sized avatar

Sam Dana samueldana

  • Prometheus Computing
View GitHub Profile
@samueldana
samueldana / gist:6114119
Created July 30, 2013 15:43
Wx::SplashScreen usage.
require 'wx'
class Runner < Wx::App
attr_accessor :splash
def on_init
splash_file = File.join(File.dirname(__FILE__), 'media', 'splash.png')
splash_bitmap = Wx::Bitmap.new(splash_file, Wx::BITMAP_TYPE_PNG)
@splash = Wx::SplashScreen.new(splash_bitmap,
Wx::SPLASH_CENTRE_ON_SCREEN|Wx::SPLASH_NO_TIMEOUT, 0, nil, -1)
@splash.show
@samueldana
samueldana / ramaze_before_all_failure.rb
Created January 24, 2013 18:26
Ramaze before_all hook fails when using a layout?
require 'ramaze'
require 'bacon'
require 'ramaze/spec/bacon'
Ramaze.middleware :spec do
run Ramaze.core
end
Ramaze::Log.level = Logger::ERROR
Ramaze.options.mode = :spec
@samueldana
samueldana / description.txt
Created October 21, 2010 20:57
Server setup issue using Nginx, RVM, Ruby-1.9.1, and Thin
So, I'm setting up a new Ubuntu 10.04 server with nginx, RVM, Ruby-1.9.1, and Thin.
I got through installing nginx, RVM, ruby-1.9.1 without any problems.
Ruby-1.9.1 was installed using 'rvm install x';
I don't have a system Ruby (Which is what I've been doing previously).
I've also set the default ruby to 1.9.1 for myself and root.
I installed the thin gem using 'gem install thin'
I then installed thin to the system using
'thin install'
import javax.script.*;
import java.io.*;
public class Driver
{
public static void main(String[] args) throws ScriptException, FileNotFoundException, NoSuchMethodException {
// Setup stuff....
// Get the ScriptEngineManager
ScriptEngineManager manager = new ScriptEngineManager();
// Get the JRuby engine
@samueldana
samueldana / Driver.java
Created April 19, 2010 20:11
Attempting to use JRuby Objects from Java via Red Bridge
import javax.script.*;
import java.io.*;
import interfaces.*;
public class Driver {
public static void main(String[] args) throws ScriptException, FileNotFoundException, NoSuchMethodException {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("jruby");