This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pdftohtmlr' | |
require 'nokogiri' | |
include PDFToHTMLR | |
file = PdfFilePath.new("test.pdf", # source pdf file path | |
nil, # target html file path - not implemented | |
nil, # user password | |
nil # owner password | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# For accessing Go!Temp probe from Ruby on Linux | |
f = File.new("/dev/ldusb0") | |
packet = f.read(8) | |
parsed_packet = packet.unpack('ccsss') | |
puts "temp: #{(parsed_packet[2]/128).to_s}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'pachuber' | |
require 'eeml' | |
f = File.new("/dev/ldusb0") | |
packet = f.read(8) | |
parsed_packet = packet.unpack('ccsss') | |
temp = parsed_packet[2]/128 | |
pachube_api_key = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
require "rubygems" | |
require "mysql" | |
begin | |
# connect to the MySQL server | |
dbh = Mysql.real_connect("url", "user", "pass", "db") | |
# get server version string and display it | |
puts "Server version: " + dbh.get_server_info | |
res = dbh.query("select id, title, body, published_at from contents") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JobRoute { | |
def configure = { | |
println "Setting JobRoute Camel Router..." | |
from("seda:job.contents"). | |
process{ exchange -> | |
String body = exchange.getIn().getBody() | |
def job = new XmlParser().parseText(body) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content:SUBJECT: CHECKMATE Army and Marine Corps Info Sharing and Reporting Initiative1. BACKGROUND: CHECKMATE originated as a collaborative effort of CAC-CDID?s IED-D ICDT Battle Command lead and the BCBL(L), CIO/G-6-funded Service Oriented Architecture (SOA) pilot to prototype the development of simplified and structured data entry and management. A CHECKMATE presentation in Jan 09 to the JCOE (NTC) resulted in USMC co-sponsorship for a JIEDDO funding submission, which includes a 12 month product development, followed 6 months later by a USA BCT / USMC MEB training center assessment, and finally, an operational assessment in Afghanistan. 2. DESCRIPTION: CHECKMATE?s integrated C2 infrastructure potentially ties the tactical edge to C-IED national capabilities (e.g., COIC) through the Global Information Grid (GIG), and moves time-sensitive indications, warnings, and alerts to Soldiers and Marines. CHECKMATE will operate over existing low-bandwidth communications, will integrate into existing Army Battle Comma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes | |
import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest | |
import org.springframework.mock.web.MockHttpServletResponse | |
import org.springframework.mock.web.MockServletContext | |
import org.springframework.mock.web.MockMultipartHttpServletRequest | |
import org.springframework.web.context.request.RequestContextHolder | |
import grails.test.* | |
class JobControllerTests extends GroovyTestCase { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmi:version="2.0"> | |
<cas:NULL xmlns:cas="http:///uima/cas.ecore" xmi:id="0"/> | |
<cas:Sofa xmlns:cas="http:///uima/cas.ecore" xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="SUBJECT: CHECKMATE Army and Marine Corps Info Sharing and Reporting Initiative | |
1. BACKGROUND: CHECKMATE originated as a collaborative effort of CAC-CDIDÃs IED-D ICDT Battle Command lead and the BCBL(L), CIO/G-6-funded Service Oriented Architecture (SOA) pilot to prototype the development of simplified and structured data entry and management. A CHECKMATE presentation in Jan 09 to the JCOE (NTC) resulted in USMC co-sponsorship for a JIEDDO funding submission, which includes a 12 month product development, followed 6 months later by a USA BCT / USMC MEB training center assessment, and finally, an operational assessment in Afghanistan. | |
2. DESCRIPTION: CHECKMATEÃs integrated C2 infrastructure potentially ties the tactical edge to C-IED national capabilities (e.g., |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmi:version="2.0"> | |
<cas:NULL xmlns:cas="http:///uima/cas.ecore" xmi:id="0"/> | |
<cas:Sofa xmlns:cas="http:///uima/cas.ecore" xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text" sofaString="¬?¬?¬?¬?¬?¬?¬?¬?¬?¬?¬?¬?¬? 5 August 2009 | |
SUBJECT:¬? CHECKMATE Army and Marine Corps Info Sharing and Reporting Initiative | |
1.¬? BACKGROUND: CHECKMATE originated as a collaborative effort of CAC-CDID?Äôs IED-D ICDT Battle Command lead and the BCBL(L), CIO/G-6-funded Service Oriented Architecture (SOA) pilot to prototype the development of simplified and structured data entry and management. A CHECKMATE presentation in Jan 09 to the JCOE (NTC) resulted in USMC co-sponsorship for a JIEDDO funding submission, which includes a 12 month product development, followed 6 months later by a USA BCT / USMC MEB training center assessment, and finally, an operational assessment in Afghanistan.¬? | |
¬? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^Crake aborted! | |
tried to create Proc object without a block | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/sinatra-1.0/lib/sinatra/base.rb:859:in `define_method' | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/sinatra-1.0/lib/sinatra/base.rb:859:in `route' | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/sinatra-1.0/lib/sinatra/base.rb:838:in `get' | |
(__DELEGATE__):2:in `send' | |
(__DELEGATE__):2:in `get' | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/redis-namespace-0.4.1/lib/redis/namespace.rb:166:in `send' | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/redis-namespace-0.4.1/lib/redis/namespace.rb:166:in `method_missing' | |
/Users/kplummer/.rvm/gems/ruby-1.8.7-p249/gems/resque-1.8.0/lib/resque/worker.rb:406:in `processing' |