Skip to content

Instantly share code, notes, and snippets.

# declare stack
stack "ffmpeg-2.3"
# this is the important part that will include ffmpeg-2.3 gpac 0.51
# OS - Ubuntu 12.04.5
# check out all the installed libraries on this stack here
# declare runtime to use
runtime "ruby"
# declare a runtime our FFMPEG stack supports
# -Python
@Stephenitis
Stephenitis / gist:67d149ba643249d91800
Created August 7, 2014 09:05
log node version and openssl version within nodescript
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) } exec("openssl version", puts);
console.log(process.version);
Grid Analysis and Display System (GrADS) Version 2.0.2
Copyright (c) 1988-2011 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information
Config: v2.0.2 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile
Issue 'q config' command for more detailed configuration information
GX Package Initialization: Size = 11 8.5
Running in Batch mode
Successfully installed netrc-0.7.7
Successfully installed rest_client-1.7.3
Successfully installed net-http-persistent-2.9.4
Successfully installed rest-2.7.1
Successfully installed iron_core-1.0.4
Successfully installed bundler-1.6.3
Successfully installed rubyzip-0.9.9
Successfully installed iron_worker_ng-1.5.0
8 gems installed
I, [2014-07-11T23:07:45.259352 #17] INFO -- IronWorkerNG: Found workerfile with path='worker200.worker'
@Stephenitis
Stephenitis / ExampleService.php
Last active August 29, 2015 14:02
src/My/Bundle/ExampleBundle/Service/ExampleService.php
use Uecode\Bundle\QPushBundle\Event\MessageEvent;
use Uecode\Bundle\QPushBundle\Message\Message;
public function onMessageReceived(MessageEvent $event)
{
$id = $event->getMessage()->getId();
$body = $event->getMessage()->getBody();
$metadata = $event->getMessage()->getMetadata();
// do some processing
public function publishAction()
{
$message = ['foo' => 'bar'];
// fetch your provider service from the container
$this->get('uecode_qpush')->get('my_queue_name')->publish($message);
}
curl -s https://api.github.com/orgs/iron-io/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
in controller
def show
@contract = Contract.find(1) # you'll normally take a number from params instead
@orders = @contract.orders
end
in your view aka show.html.erb
{hello}
@Stephenitis
Stephenitis / hash_that_wont_encode.rb
Created December 26, 2013 19:05
this Json returns a error when trying to encode with JSON or MultiJSON
{"Stamford, Connecticut"=>["Stamford firefighter Nick Tamburro pays his respects outside the home of Madonna Badger in Stamford, Conn., Tuesday, Dec. 27, 2011.", "(JTA) - The nephew of Connecticut Gov. Dannel Malloy was arrested for trespassing in a yeshiva high school in Stamford. Kerry Mallory, an actor who appears in the new movie “The Wolf of Wall Street,” was arrested Monday on the property of Yeshiva Bais ...", "Jennifer Oxer of DeYulio Sausage holds eviction notice on Friday December 20, 2013 in the Stamford, Conn. office. The business is getting evicted on Monday forcing the furlough of 20 employees right before Christmas as the city looks to move ahead with ...", "Reporter Christina Chiarelli takes a look back at who made news in Culture in Stamford in 2013. A nine year veteran with the Stamford Police Department and leader of its K-9 unit -- Officer Seth O'Brien was named Officer of the Year.", "Four candidates stepped up for the city's top job after Republican Michael Pavia decided not to run for r