Skip to content

Instantly share code, notes, and snippets.

View kyoma-takahashi's full-sized avatar

kyoma-takahashi

View GitHub Profile
@kyoma-takahashi
kyoma-takahashi / buildtorrent.rb
Created December 16, 2013 00:57
Homebrew formula for buildtorrent-0.8
require 'formula'
class Buildtorrent < Formula
homepage 'http://mathr.co.uk/blog/torrent.html'
url 'http://mathr.co.uk/blog/code/buildtorrent-0.8.tar.gz'
head 'https://git.gitorious.org/buildtorrent/buildtorrent.git'
sha1 '32694478ddef91453dc85ab7a2e659132adadeb6'
def install
system './configure', '--disable-debug',
#!/usr/bin/ruby
SERIAL_DEVICE = '/dev/tty.usbserial-FTXYGCM5'
# On Windows, like SERIAL_DEVICE = 'COM4'
require 'rubygems'
require 'rmodbus'
# does not support 23 (0x17) Read/Write Multiple registers
# according to https://github.com/flipback/rmodbus
require 'serialport'
#!/usr/bin/ruby
SERIAL_DEVICE = '/dev/tty.usbserial-FTXYGGG9'
# On Windows, like SERIAL_DEVICE = 'COM5'
require 'rubygems'
require 'rmodbus'
require 'serialport'
# To prepare,