Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Currently available for work. Let's talk!

Ron Evans deadprogram

💭
Currently available for work. Let's talk!
View GitHub Profile
** Invoke extensions:digest_sha1 (first_time)
** Execute extensions:digest_sha1
/Users/ron/.rvm/src/rbx-head/staging/bin/rbx extconf.rb
Building sha1
checking for main() in -lcrypto... yes
checking for openssl/sha.h... yes
checking for sys/cdefs.h... yes
checking for inttypes.h... yes
checking for unistd.h... yes
creating Makefile
@deadprogram
deadprogram / b9600
Last active December 12, 2015 09:19
$ socat -d -d -d TCP-LISTEN:4567,fork /dev/tty.usbserial-A700636n,nonblock,raw,b9600
2013/02/10 09:55:51 socat[9197] I socat by Gerhard Rieger - see www.dest-unreach.org
2013/02/10 09:55:51 socat[9197] I This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
2013/02/10 09:55:51 socat[9197] I This product includes software written by Tim Hudson (tjh@cryptsoft.com)
2013/02/10 09:55:51 socat[9197] I setting option "fork" to 1
2013/02/10 09:55:51 socat[9197] I socket(2, 1, 6) -> 3
2013/02/10 09:55:51 socat[9197] I starting accept loop
2013/02/10 09:55:51 socat[9197] N listening on LEN=16 AF=2 0.0.0.0:4567
2013/02/10 09:55:55 socat[9197] I accept(3, {2, LEN=16 AF=2 127.0.0.1:60910}, 16) -> 4
2013/02/10 09:55:55 socat[9197] N accepting connection from LEN=16 AF=2 127.0.0.1:60910 on LEN=16 AF=2 127.0.0.1:4567
require 'artoo/robot'
SPHEROS = ["4567",
"4568",
"4569",
"4570",
"4571"]
class SpheroRobot < Artoo::Robot
connection :sphero, :adaptor => :sphero
$ ruby examples/hello.rb
I, [2013-01-13T13:12:51.416600 #78702] INFO -- : Registering connection 'loop'...
I, [2013-01-13T13:12:51.416746 #78702] INFO -- : Preparing work...
I, [2013-01-13T13:12:51.417284 #78702] INFO -- : Initializing connection loop...
I, [2013-01-13T13:12:51.419141 #78702] INFO -- : Starting work...
hello
hello
hello
wow
hello
ron@Ron-Evanss-MacBook-Pro ~/Developer/ruby-serialport
$ /usr/local/kidsruby/ruby/bin/ruby /usr/local/kidsruby/ruby/bin/rake compile --trace
** Invoke compile (first_time)
** Invoke compile:universal.x86_64-darwin10.8.0 (first_time)
** Invoke compile:serialport:universal.x86_64-darwin10.8.0 (first_time)
** Invoke copy:serialport:universal.x86_64-darwin10.8.0:1.9.2 (first_time)
** Invoke lib (first_time, not_needed)
** Invoke tmp/universal.x86_64-darwin10.8.0/serialport/1.9.2/serialport.bundle (first_time)
** Invoke tmp/universal.x86_64-darwin10.8.0/serialport/1.9.2/Makefile (first_time, not_needed)
** Invoke tmp/universal.x86_64-darwin10.8.0/serialport/1.9.2 (first_time, not_needed)
Building serialport gem...
cd tmp/universal.x86_64-darwin10.8.0/serialport/1.9.2
make
gcc -I. -I/usr/local/kidsruby/ruby/include/ruby-1.9.1/universal-darwin10.8.0 -I/usr/local/kidsruby/ruby/include/ruby-1.9.1/ruby/backward -I/usr/local/kidsruby/ruby/include/ruby-1.9.1 -I../../../../ext/native -DHAVE_TERMIOS_H -DHAVE_UNISTD_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -fno-common -pipe -DOS_DARWIN -arch i386 -arch x86_64 -o posix_serialport_impl.o -c ../../../../ext/native/posix_serialport_impl.c
In file included from /usr/local/kidsruby/ruby/include/ruby-1.9.1/ruby.h:32,
from ../../../../ext/native/serialport.h:26,
from ../../../../ext/native/posix_serialport_impl.c:20:
/usr/local/kidsruby/ruby/include/ruby-1.9.1/ruby/ruby.h:50:21: error: stdlib.h: No such file or directory
/usr/local/kidsruby/ruby/include/ruby-1.9.1/ruby/ruby.h:54:21: error: string.h: No such file or directory
/u
Installing gems...
/usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:217:in `exists?': Insecure operation - exists? (SecurityError)
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:217:in `load_file'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:164:in `initialize'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:71:in `new'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:71:in `do_configuration'
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/gem_runner.rb:44:in `run'
from /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem:30:in `<main>'
/usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:217:in `exists?': Insecure operation - exists? (SecurityError)
from /usr/local/kidsruby/ruby/lib/ruby/1.9.1/rubygems/config_file.rb:217:in `load_file'
Installing gems...
/Users/ron/Developer/kidsrubyinstaller-osx/build/KidsRubyInstaller.app/Contents/Resources/script: line 112: /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem: No such file or directory
/Users/ron/Developer/kidsrubyinstaller-osx/build/KidsRubyInstaller.app/Contents/Resources/script: line 113: /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem: No such file or directory
/Users/ron/Developer/kidsrubyinstaller-osx/build/KidsRubyInstaller.app/Contents/Resources/script: line 114: /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem: No such file or directory
/Users/ron/Developer/kidsrubyinstaller-osx/build/KidsRubyInstaller.app/Contents/Resources/script: line 115: /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem: No such file or directory
Installing qtbindings gem...
/Users/ron/Developer/kidsrubyinstaller-osx/build/KidsRubyInstaller.app/Contents/Resources/script: line 120: /Applications/KidsRuby/KidsRuby.app/core/ruby/bin/gem: No such file or directory
Installing gosu gem..
/Users/ro
/usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:251:in `exist?': Insecure operation - exist? (SecurityError)
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:251:in `load_file'
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:190:in `initialize'
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:78:in `new'
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:78:in `do_configuration'
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:51:in `run'
from /usr/local/kidsruby/ruby/bin/gem:30:in `<main>'
/usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:251:in `exist?': Insecure operation - exist? (SecurityError)
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:251:in `load_file'
from /usr/local/kidsruby/ruby/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:190:in `initialize'

ATT OAuth2 Clojure Client

Example of accessing ATT OAuth in Clojure using noir.

Usage

lein deps
CLIENT_ID=XXX CLIENT_SECRET=YYY AUTH_SERVER=xyz.com lein run