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
super
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 = Array.new(@size){ Array.new(@size) }
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 #{target.name} (from #{app.name})"
#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)
end
View method_source and parser
begin
require 'method_source'
require 'parser/current'
require 'unparser'
rescue LoadError
nil
end
module Chewy
class Type
View README.md

This is a note for myself more than anything. I've started on a wrapper for the rtosc library https://github.com/fundamental/rtosc

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. https://github.com/fundamental/rtosc/issues/28

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 bit.ly/TityVa
Dim oCells As ElementEnumerator
Dim oElement As Element
Dim oCriteria As New ElementScanCriteria
Dim oCell As CellElement
View gist:da389a7503f37f6a149849931218da31
#!/usr/local/bin/ruby
# -*- coding: cp932 -*-
require 'win32ole'
require 'delegate'
require 'singleton'
require 'util'
module VISIO
module VisioConsts