Skip to content

Instantly share code, notes, and snippets.

View stain's full-sized avatar

Stian Soiland-Reyes stain

View GitHub Profile
@stain
stain / gist:7ed8e1c9cdeb7d3b5f0d
Created September 25, 2014 13:33
How to patch docker image for the bash https://shellshocker.net/
stain@docker:~$ docker run dockerfile/elasticsearch env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
stain@docker:~$
# Let's update the docker image
docker run -i -t dockerfile/elasticsearch /bin/bash
apt-get update
apt-get dist-upgrade inside
@stain
stain / goingsouth.ipynb
Created October 15, 2014 13:21
Going South from the South (iPython nodebook)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stain
stain / gist:0f65cc0f9c8d3f731a54
Created October 20, 2014 10:21
Taverna has been accepted as an Apache Incubator project

Taverna has been accepted as an Apache Incubator project

The Apache Software Foundation is a non-profit organization, forming a community of open-source software projects with strong emphasis on openness, collaboration and a consensus-based development process. Well-known Apache projects include the Apache HTTP server, Tomcat, Maven, Jena, CXF and OpenOffice.

Taverna will participate in the Apache Incubator process - http://incubator.apache.org/incubation/Process_Description.html - with assigned mentors that help assure that we follow the Apache guidelines.

Practically this means that the Taverna code base, mailing lists and website will be migrated to the Apache infrastructure, and future releases will be called Apache Taverna.

Apache Taverna development will follow a clear open process, with important decisions (such as approving a release) done by voting on the new dev@taverna.incubator.apache.org mailing list, which will be open to anyone.

<?xml version="1.0"?>
<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.4.0">
<dataflow id="a076fdee-b459-4581-8109-f152156c5329" role="top">
<name>Workflow_digital-preservation-characterisation-video-ffprobe-video2xml_1.0.1</name>
<inputPorts>
<port>
<name>input</name>
<depth>0</depth>
<granularDepth>0</granularDepth>
<annotations>
@stain
stain / gist:707c411c65507c830273
Created November 15, 2014 22:49
oh, the irony...
stain@biggie-mint ~ $ asdkj
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 27, in <module>
from CommandNotFound.util import crash_guard
ImportError: No module named 'CommandNotFound'
top - 14:45:59 up 4 days, 22:28, 8 users, load average: 1.86, 1.55, 1.51
Tasks: 521 total, 2 running, 519 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 1.7%ni, 97.5%id, 0.6%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 49409280k total, 49191260k used, 218020k free, 850196k buffers
Swap: 51199996k total, 156236k used, 51043760k free, 41689352k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20415 999 20 0 2202m 1.6g 4444 S 1.3 3.4 126:18.76 mysqld
4394 root 20 0 22.8g 1.3g 11m S 3.0 2.7 7:43.25 java
19964 tomcat 20 0 15.5g 675m 5920 S 0.0 1.4 3:44.79 java
@stain
stain / ZipStreamer.java
Created January 2, 2015 11:30
Streaming zip
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.concurrent.atomic.AtomicLong;
import java.util.zip.ZipEntry;
// ------------------------------------------------------------------
// Transitive dependencies of this project determined from the
// maven pom organized by organization.
// ------------------------------------------------------------------
Apache Taverna Databundle API
From: 'Aduna' (http://www.aduna-software.com/)
- Aduna Commons: Collections (https://wiki.aduna-software.org/confluence/display/COM/Collections) info.aduna.commons:aduna-commons-collections:jar:2.3
@stain
stain / reify.md
Last active August 29, 2015 14:14

From http://www.uniprot.org/uniprot/P35354.rdf

<rdf:RDF xmlns="http://purl.uniprot.org/core/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:void="http://rdfs.org/ns/void#" xmlns:sd="http://www.w3.org/ns/sparql-service-description#" xmlns:faldo="http://biohackathon.org/resource/faldo#">

<!-- .. -->
<rdf:Description rdf:about="http://purl.uniprot.org/uniprot/P35354">
  <citation rdf:resource="http://purl.uniprot.org/citations/16373578" rdf:ID="_5033353335340018"/>
  <!-- .. -->
@stain
stain / NOTICE
Created February 10, 2015 16:49
// ------------------------------------------------------------------
// NOTICE file corresponding to the section 4d of The Apache License,
// Version 2.0, in this case for
// ------------------------------------------------------------------
Apache log4j
Copyright 2007 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).