Skip to content

Instantly share code, notes, and snippets.

@gditrick
gditrick / commands.txt
Last active December 25, 2015 00:49
Sybase SqlAnywhere Ubuntu inti.d scripts and commands used to test Sequel sqlanywhere adapter.
Initialize db (from what I remember that I did)
# dbinit -n <server-name> -gd all -sn Test <db-file>
Start db (not required to be in an init.d file, dbsrv12 or dbeng12 will start one, just pass the args or an arg file)
# sudo /etc/init.d/sa12 start
install native driver gem after you install sqlanywhere 12
might require a LIBPATH to be set to the sqlany12 .so libs
# gem install sqlanywhere
@gditrick
gditrick / jdbc.rb
Last active December 21, 2015 03:18
Sequel Sybase SqlAnywhere adapter. Problem with the Dataset operations graphing correctly
require 'java'
require 'pp'
Sequel.require 'adapters/utils/stored_procedures'
module Sequel
# Houses Sequel's JDBC support when running on JRuby.
module JDBC
# Make it accesing the java.lang hierarchy more ruby friendly.
module JavaLang
include_package 'java.lang'
@gditrick
gditrick / LightBarFrame.java
Created October 24, 2011 18:45
jruby Monkeybars rawr nested views locking up swing app
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* BayControllerFrame.java
*
* Created on Oct 19, 2011, 9:11:11 AM
*/
@gditrick
gditrick / _form.erb
Created January 1, 2011 01:58
Need some help with some AJAX to dynamically add/remove a table row.
<%= form_for([@tournament,@player], :remote => true) do |f| %>
<p>
<%= f.label :name, 'Name' %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :email, 'Email' %><br />
<%= f.text_field :email %>
</p>
<p>