Skip to content

Instantly share code, notes, and snippets.

@danstaines
danstaines / activemq.xml
Created April 20, 2016 14:52
Active MQ with 2 queues and 1 virtual queue
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@danstaines
danstaines / read_event.pl
Created April 20, 2016 14:44
Read an event from STOMP
#!/usr/bin/env perl
use warnings;
use strict;
use Net::STOMP::Client;
use Log::Log4perl qw/:easy/;
use Getopt::Long;
use Carp;
use Pod::Usage;
@danstaines
danstaines / write_event.pl
Created April 20, 2016 14:44
Write an event using STOMP
#!/usr/bin/env perl
use warnings;
use strict;
use Net::STOMP::Client;
use Log::Log4perl qw/:easy/;
use Getopt::Long;
use Carp;
use Pod::Usage;
@danstaines
danstaines / search.js
Created April 20, 2016 09:36
Simplified example of JavaScript search code
var searchMod = angular.module('search', [ 'datatables' ]);
function ajax(search) {
return {
url : '/api/query',
type : 'POST',
contentType : 'application/json',
data : function(data) {
console.log("Posting data");
// create post
@danstaines
danstaines / gist:6293539
Last active December 21, 2015 10:39
Script for dumping genes and "gene" simple features from subset of Ensembl Bacteria databases
#!/usr/bin/env perl
use strict;
use warnings;
use Bio::EnsEMBL::LookUp;
use Bio::Seq;
use Bio::EnsEMBL::Utils::IO::FASTASerializer;
print "Building helper\n";
my $helper = Bio::EnsEMBL::LookUp->new(-URL=>"http://bacteria.ensembl.org/registry.json",-NO_CACHE=>1);