Skip to content

Instantly share code, notes, and snippets.

View rhass's full-sized avatar
🏠
Working from home

Ryan Hass rhass

🏠
Working from home
View GitHub Profile
@rhass
rhass / default.rb
Created July 23, 2012 20:43
Default Recipe
#
# Cookbook Name:: rhodecode
# Recipe:: default
#
# Copyright 2012, Rapid7, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# 'Software'), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@rhass
rhass / chef-stacktrace.out
Created October 25, 2012 23:40
chef-client fail
Generated at 2012-10-25 16:27:00 -0700
IndexError: string not matched
/var/chef/cache/cookbooks/chef-codesign/attributes/default.rb:12:in `[]='
/var/chef/cache/cookbooks/chef-codesign/attributes/default.rb:12:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/node.rb:656:in `block (2 levels) in load_attributes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/node.rb:654:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/node.rb:654:in `block in load_attributes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/node.rb:653:in `each'
java.lang.UnsatisfiedLinkError: /srv/Downloads/digispark/arduino-1.03/lib/librxtxSerial.so: /srv/Downloads/digispark/arduino-1.03/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /srv/Downloads/digispark/arduino-1.03/lib/librxtxSerial.so: /srv/Downloads/digispark/arduino-1.03/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at processing.app.Editor.populateSerialMenu(Editor.java:962)
at processing.app.Editor.buildToolsMenu(Editor.java:691)
@rhass
rhass / gist:4720016
Created February 6, 2013 03:33
This seems to print: "32125"
void setup() {
Serial.begin(115200);
}
void loop() {
String jsonStringObj = String('{"name":"Arduino-Test","url":"job/Arduino-Test/","build":{"full_url":"https://fqdn/job/Arduino-Test/43/","number":43,"phase":"STARTED","url":"job/Arduino-Test/43/"}}');
Serial.println(jsonStringObj);
delay(10000);
}
"jenkins": {
"install": {
"dir": "/srv/jenkins"
},
"server": {
"plugins": [
"active-directory",
"mercurial",
"git"
],
{
"key1": "value1",
"key2": "value2",
"id"": "stuff"
}
# Depend on chef_gem for versions prior to Chef 11.
unless "#{node['chef_packages']['chef']['version']}".match('^11..*')
depends 'chef_gem'
end
@rhass
rhass / Berksfile
Last active December 18, 2015 08:00
site :opscode
cookbook 'java'
cookbook 'tomcat'
cookbook 'maven'
@rhass
rhass / default.rb
Last active December 18, 2015 10:38
# Set the java flavor to prevent OpenJDK from installing right away.
node.set['java']['install_flavor'] = 'oracle'
node.set['java']['oracle']['accept_oracle_download_terms'] = true
node.set['java']['jdk_version'] = '7'
# URI and SHA256 Checksum for the desired JDK.
node.default['java']['url'] = 'http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.tar.gz'
node.default['java']['checksum'] = '390700b531491ab51c00432517ac8739b7a61c9817fcde3650aa6dbd9b21c056'
node.set['tomcat']['base_version'] = '7'
node.set['tomcat']['ssl_port'] = 9669
Example Serial Output:
Pin 4130 raw value: 621 minDistance value: 400 Slow distance value: 0 Pin 4131 raw value: 606 minDistance value: 400 Slow distance value: 0
Pin 4130 raw value: 542 minDistance value: 400 Slow distance value: 0 Pin 4131 raw value: 544 minDistance value: 400 Slow distance value: 0
Pin 4130 raw value: 463 minDistance value: 400 Slow distance value: 0 Pin 4131 raw value: 472 minDistance value: 400 Slow distance value: 0
Pin 4130 raw value: 406 minDistance value: 400 Slow distance value: 0 Pin 4131 raw value: 414 minDistance value: 400 Slow distance value: 0
Pin 4130 raw value: 376 minDistance value: 376 Slow distance value: 8 Pin 4131 raw value: 382 minDistance value: 382 Slow distance value: 6
Pin 4130 raw value: 352 minDistance value: 352 Slow distance value: 16 Pin 4131 raw value: 354 minDistance value: 354 Slow distance value: 15
Pin 4130 raw value: 338 minDistance value: 338 Slow distance value: 20 Pin 4131 raw value: 340 minDistance value: 340 Slow distance value: 20
Pin 4130 raw valu