Skip to content

Instantly share code, notes, and snippets.

View radekstepan's full-sized avatar

Radek Stepan radekstepan

View GitHub Profile
@radekstepan
radekstepan / docker-install.sh
Last active January 19, 2024 10:13
Install Docker on Debian 7 Wheezy
#/bin/bash
if [ `getconf LONG_BIT` != 64 ]; then
exit 1
fi
sudo apt-get -y update
sudo apt-get -y install lxc wget bsdtar iptables curl golang git aufs-tools mercurial libdevmapper-dev
export GOPATH=~/usr/lib/go
@radekstepan
radekstepan / organisms.diff
Created January 30, 2014 13:48
Shows an organisms dropdown on homepage list upload like on Lists page
diff --git a/intermine/web/main/src/org/intermine/web/struts/BeginAction.java b/intermine/web/main/src/org/intermine/web/struts/BeginAction.java
index b5a4979..477789e 100644
--- a/intermine/web/main/src/org/intermine/web/struts/BeginAction.java
+++ b/intermine/web/main/src/org/intermine/web/struts/BeginAction.java
@@ -18,6 +18,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Iterator;
#!/usr/bin/env coffee
http = require 'http'
# Which mine?
mine = 'http://beta.flymine.org/beta'
# Replace multiple whitespace with a single space.
clean = (text) -> text.replace(/\s+/g, ' ')
# Get the services listing.
@radekstepan
radekstepan / pbackup.py
Created November 26, 2013 12:25
A backup script that uses the pbworks API to download all pages and files in a given wiki workspace.
#!/usr/bin/python
# -*- coding: utf -*-
import urllib2, json, datetime, os, unicodedata, re, codecs
from threading import Thread
API_KEY = '#'
WIKI = '#'
def slugify(value):
defmodule C do
def map([], _), do: []
def map([ head | tail ], func) do:
[ func.(head), map(tail, func) ]
end
def child(element, func, parent) do:
parent <- { self, func.(element) }
end
@radekstepan
radekstepan / merge.coffee
Created September 8, 2013 12:35
merge pdfs together
fs = require 'fs'
path = require 'path'
async = require 'async'
{ exec } = require 'child_process'
outs = []
async.each ( file for file in fs.readdirSync('.') when path.extname(file) is '.pdf' ), (file, cb) ->
outs.push out = path.basename(file, '.pdf') + 'decrypted.pdf'
exec "qpdf #{file} #{out} --decrypt", cb
[[PageOutline]]
The following items should be tested before each release. Be sure to vary the following:
* super | regular user
* logged in | out
* Firefox, IE 7/9, Chrome, Safari
* new | old user
= ACCOUNT =