Skip to content

Instantly share code, notes, and snippets.

@CootCraig
CootCraig / Gemfile
Created September 11, 2013 21:52
Attempt at Reel ajax long poll response gets Reel::Connection::StateError: already processing a request
source 'https://rubygems.org'
gem "trollop"
gem "reel"
@CootCraig
CootCraig / Gemfile
Last active December 22, 2015 01:19
Demonstration of reel (0.4.0.pre) http responses returning incorrect reel (0.4.0.pre)
source 'https://rubygems.org'
gem "celluloid", "~> 0.15.0.pre"
gem "reel", "~> 0.4.0.pre"
@CootCraig
CootCraig / logger.js
Created August 8, 2013 16:38
PhantomJs logger, logs to file and console.
// logger = require('logger');
// logger.log_to_console(true);
// logger.log_to_folder('log','_app.log');
// logger.set_log_level('DEBUG');
// logger.info('Happy to be here.');
exports.logger = (function() {
var that = {};
that.levels = {
"TRACE": 0,
"DEBUG": 1,
@CootCraig
CootCraig / dtest.asp
Created June 6, 2013 04:06
ASP uiTableFilter examples
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/Inbound.asp" -->
<%
Dim debulk
Set debulk = Server.CreateObject("ADODB.Recordset")
debulk.ActiveConnection = MM_Inbound_STRING
debulk.Source = "SELECT debulk_last as 'Last', debulk_first as 'First', debulk_addr1 as 'Address 1', debulk_addr2 as 'Address 2', debulk_city as 'City', debulk_state as 'State', debulk_zip as 'Zip', debulk_complex as 'Apartment Complex' FROM dbo.debulk"
debulk.CursorType = 0
@CootCraig
CootCraig / Notes
Created May 21, 2013 07:24
Java 1.8.0-ea-b90 warning with JRuby 1.7.4
=====================================
craig@craigs:~$ uname -a
Linux craigs 3.8.0-21-generic #32-Ubuntu SMP Tue May 14 22:16:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
=====================================
craig@craigs:~$ jruby -v
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_21-b11 [linux-amd64]
craig@craigs:~$ gem list
*** LOCAL GEMS ***
@CootCraig
CootCraig / notes
Created March 24, 2013 20:25
jruby 1.7.2 celluloid ffi-rzmq fail script at git@github.com:CootCraig/celluloid_zmq_test.git
jruby -v
jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot(TM) Client VM 1.8.0-ea-b78 +indy [Windows 2003-x86]
script at
git@github.com:CootCraig/celluloid_zmq_test.git
========================= log output
libzmq version {:major=>2, :minor=>2, :patch=>0}
app.run
EventLogger starting
@CootCraig
CootCraig / fail notes
Created March 24, 2013 19:49
celluloid, ffi-rzmq script fails on windows with jruby 1.7.3
celluloid, ffi-rzmq script fails on windows with jruby 1.7.3
script at
git@github.com:CootCraig/celluloid_zmq_test.git
$ jruby -v
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) Client VM 1.8.0-ea-b78 +indy [Windows 2003-x86]
======================================================== script output
libzmq version {:major=>2, :minor=>2, :patch=>0}
@CootCraig
CootCraig / dumper.rb
Created March 24, 2013 00:49
Demonstration of JRuby and jnetpcap This was test on Windows with pcap installed
require 'java'
require 'jnetpcap.jar'
require 'ipaddr'
require 'json'
class PacketHandler
include Java::org::jnetpcap::packet::PcapPacketHandler
def initialize
@tcp_header = Java::org::jnetpcap::protocol::tcpip::Tcp.new
@CootCraig
CootCraig / Gemfile.lock
Last active December 15, 2015 00:28
2013-03-15 Windows, JRuby, Celluloid,ffi-rzmq problem
GEM
remote: https://rubygems.org/
specs:
actionpack (3.2.12)
activemodel (= 3.2.12)
activesupport (= 3.2.12)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
@CootCraig
CootCraig / Gemfile
Created December 4, 2012 23:48
jruby 1.7.1 windows debug celluloid crash
source "http://rubygems.org"
gem "celluloid"