Skip to content

Instantly share code, notes, and snippets.

View tompurl's full-sized avatar

Tom Purl tompurl

View GitHub Profile
@tompurl
tompurl / MyTest.java
Created January 11, 2011 18:07
This is some text This is also some text
// this is a comment
TESt t = new Test();
@tompurl
tompurl / tompurl-test.sh
Created January 28, 2011 17:36
This is a test
#!/bin bash
echo this is a test
NameError: method 'indexes' not defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
from org/jruby/RubyModule.java:2317:in `remove_method'
from /home/tom/.rvm/gems/jruby-1.6.7.2/gems/schema_plus-0.3.4/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.r
b:52:in `included'
from org/jruby/RubyModule.java:2277:in `module_eval'
from /home/tom/.rvm/gems/jruby-1.6.7.2/gems/schema_plus-0.3.4/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.r
b:51:in `included'
from org/jruby/RubyModule.java:2118:in `include'
from org/jruby/RubyBasicObject.java:1704:in `__send__'
from org/jruby/RubyKernel.java:2101:in `send'
@tompurl
tompurl / scratch.lisp
Last active September 28, 2023 10:51
Common Lisp function that converts a list into a string of concatenated characters.
(defun numlist-to-string (lst)
(when lst
(concatenate 'string
(write-to-string (car lst)) (numlist-to-string (cdr lst)))))
; Convert a list of numbers into a number
; (list 1 2 3 4) => 1234
(parse-integer (numlist-to-string (list 1 2 3 4)))
@tompurl
tompurl / cupsd.conf
Created April 28, 2013 18:42
cupsd.conf file as of 4/28/13
LogLevel warn
MaxLogSize 0
Port 631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseRemoteProtocols
BrowseAddress @LOCAL
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
@tompurl
tompurl / server-01.rb
Last active December 28, 2015 03:29
Cowsay Socket Server - Iteration 1
require 'socket'
module CowSay
class Server
def initialize(port)
# Create the underlying socket server
@server = TCPServer.new(port)
puts "Listening on port #{@server.local_address.ip_port}"
end
@tompurl
tompurl / cowsay-client-01.rb
Created November 28, 2013 03:50
This is my first stab at a simple socket client to go against my cowsay server.
require 'socket'
module CowSay
class Client
class << self
attr_accessor :host, :port
end
# Convert our arguments into a document that we can send to the cowsay
#>server.
@tompurl
tompurl / cowsay-server-02.rb
Created November 28, 2013 03:58
Rev 2 of my cowsay serv.
require 'socket'
module CowSay
class Server
def initialize(port)
# Create the underlying socket server
@server = TCPServer.new(port)
puts "Listening on port #{@server.local_address.ip_port}"
end

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: