View udp_server.rb
require 'bundler/setup'
require 'concurrent-edge'
require 'logger'
Concurrent.use_stdlib_logger Logger::DEBUG
class MyUDPServer < Concurrent::Actor::Context
def initialize
View othero.rb
require "drb/drb"
module Othero
class Board
include Enumerable
attr_reader :size
Size = {:small => 6, :medium => 8, :large => 10}
def initialize(size= :small)
@size = Size[size]
@cells ={ }
View appexplore.rb
# explore APPS and app (s)
# don't name anything as 'app' unless you enjoy confusion
class Shoes::Types::App
def myinspect(target, from)
puts "For #{} (from #{})"
#puts "app and from are same object: #{target === app}"
puts "instance vars"
puts "#{target.inspect}"
puts target.instance_variables
View date_picker_module
require 'green_shoes'
module DatePicker
def set_no_days
@no_of_days = case @month
when 4 then 1..30
when 6 then 1..30
when 9 then 1..30
when 11 then 1..30
View date_picker_app
require 'green_shoes'
def set_no_days
@no_of_days = case @month
when 4 then 1..30
when 6 then 1..30
when 9 then 1..30
when 11 then 1..30
when 2 then 1..28
else 1..31
View custom_changeset.rb
#!/usr/bin/env ruby
require "rom-sql"
require "rom-repository"
require "dry-types"
module Relations
class Users < ROM::Relation[:sql]
schema(:users, infer: true)
View method_source and parser
require 'method_source'
require 'parser/current'
require 'unparser'
rescue LoadError
module Chewy
class Type

This is a note for myself more than anything. I've started on a wrapper for the rtosc library

The aim is to make a gem called FastOsc that will have two methods

FastOsc.serialise(["/aa", "foo", "bar"]) #=> "/aa\x00ss\x00\x00foo\x00bar\x00"
FastOsc.deserialise("/aa\x00ss\x00\x00foo\x00bar\x00") #=> ["foo", "bar"]

This followed from the rtosc library author giving me a really helpful response.

View scrapeFromCell.vba
Public Sub scrapeFromCell()
'bdoherty 2012 08 09
'scrapes text from the VARTXT cell
'based on code that was Posted by Jon Summers
'on Mon, Jan 2 2012 12:15 PM at
Dim oCells As ElementEnumerator
Dim oElement As Element
Dim oCriteria As New ElementScanCriteria
Dim oCell As CellElement
View gist:da389a7503f37f6a149849931218da31
# -*- coding: cp932 -*-
require 'win32ole'
require 'delegate'
require 'singleton'
require 'util'
module VISIO
module VisioConsts