Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Add QR to instant.io
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Adds a QR code ready for scanning next to the URL once a file is seeded.
// @source https://gist.github.com/dscho/25479c59fb01e64db97097173d51b130
// @updateURL https://gist.github.com/dscho/25479c59fb01e64db97097173d51b130/raw/qr-for-instant.io.user.js
// @downloadURL https://gist.github.com/dscho/25479c59fb01e64db97097173d51b130/raw/qr-for-instant.io.user.js
// @author dscho
// @match https://instant.io/
dim = 256; /* width / height */
frames = 20;
red = 101;
green = 164;
blue = 227;
zoomIntoX = 4;
zoomIntoY = 4;
new imagej.plugins.tools.TunePlayer().play("t150 l4 o3 c f c o2 f o3 c f l2 c l4 c f c f l3 a l8 g f e d d- l4 o3 c f c o2 f o3 c f l2 c l3 f l8 d l4 c o2 b- a g f");
http://loci.wisc.edu/software/interfacing-non-java-code
@dscho
dscho / unique-jenkins-nickname.sh
Created July 26, 2013 15:38
This script finds unique, new nicknames for Jenkins to be used in commit messages.
#!/bin/sh
# Finds a unique nick name for Jenkins in the current Git history
# List from http://www.zelo.com/firstnames/alphabet/namesj.asp
names='
jaantje
jaap
jabari
jabbar
diff --git a/eclipse-bytecode.txt b/oracle-bytecode.txt
index 287569f..c8af853 100644
--- a/eclipse-bytecode.txt
+++ b/oracle-bytecode.txt
@@ -3,41 +3,41 @@ public class net.imglib2.ops.sandbox.Expressions extends java.lang.Object{
public net.imglib2.ops.sandbox.Expressions();
Code:
0: aload_0
- 1: invokespecial #8; //Method java/lang/Object."<init>":()V
+ 1: invokespecial #1; //Method java/lang/Object."<init>":()V
@dscho
dscho / gist:5286408
Last active December 15, 2015 15:59
;; Command_Launcher.clj starts here
(import '(java.awt Color)
'(java.awt.event TextListener)
'(ij.gui GenericDialog)
'(ij IJ)
'(ij Menus))
(let [commands (keys (. Menus getCommands))
gd (GenericDialog. "Command Launcher")]
(.addStringField gd "Command: " "")
imp = IJ.createImage("Example", "8-bit", 256, 256, 10);
imp.show();
Thread.sleep(1000);
imp.getStack().deleteSlice(1);
imp.updateAndDraw();
imp.getWindow().repaint();
image = IJ.getImage();
ip = image.getProcessor();
ip = ip.duplicate();
dx = +10;
dy = -21;
ip.translate(dx, dy);
new ImagePlus("translated " + dx + ", " + dy, ip).show();