Skip to content

Instantly share code, notes, and snippets.

@dscho
dscho / ao_coreaudio.c.patch
Created February 25, 2014 15:07
Patch for MPlayer's C99 for loops declaring variables
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c
index 34374f4..ce587db 100644
--- a/libao2/ao_coreaudio.c
+++ b/libao2/ao_coreaudio.c
@@ -368,7 +368,7 @@ static void print_help(void)
{
OSStatus err;
UInt32 i_param_size;
- int num_devices;
+ int num_devices, i;
@dscho
dscho / Recorder_Likes_DialogListeners.java
Created May 8, 2015 08:01
A simple test for the claim that `Plugin`s with `DialogListener`s are not macro-recordable.
import ij.IJ;
import ij.gui.DialogListener;
import ij.gui.GenericDialog;
import ij.plugin.PlugIn;
import java.awt.AWTEvent;
/**
* A simple test for the claim that {@link Plugin}s with a
* {@link DialogListener} are not macro-recordable.
set debugfd [open "debug.txt" w]
rename proc _proc
_proc proc {name arglist body} {
uplevel 1 [list _proc $name $arglist $body]
uplevel 1 [list trace add execution $name enterstep [list ::proc_start $name]]
}
_proc proc_start {name command op} {
global debugfd
puts $debugfd "$name >> $command"
plugins/README.txt
plugins/JRuby/imagej.rb
plugins/Macros/Bulls_Eye.txt
plugins/Macros/About_Plugin_Macros.txt
plugins/Macros/batch_convert_any_to_tif.txt
plugins/Macros/RGB_Histogram.txt
plugins/Macros/Polygon_.txt
plugins/Utilities/Close_All_Without_Saving.txt
plugins/Examples/Blobs_Demo_in_Ruby.rb
plugins/Examples/Anaglyph_for_Red_Cyan_glasses.rb
$ PATH=$(pwd):$PATH git fetch localhg
Getting /home/schindelin/git/test-hg
*** failed to import extension hgext.hbisect: No module named hbisect
*** failed to import extension git from /home/schindelin/hg-git: cannot import name weakref
How can I help u todayz on ['localhg', 'hg+/home/schindelin/git/test-hg']?
Got command 'capabilities' with args ''
Capabilities are AWESUM.
Got command 'list' with args ''
from ij.plugin import Duplicator
from ij3d import *
from java.awt import Font, Frame, Color
from javax.media.j3d import Transform3D
from voltex.Mask import BlendMethod, BlendSource
image = IJ.openImage("/home/iarganda/Desktop/Main_Page_files/Stitching-overview.jpg")
mirror = Duplicator().run(image, 1, image.getStackSize())
Finding which commits last touched the files
If you _need_ to know which commit gave what file its current form, this script will help you:
(_please_, if you try to be helpful and edit the script, make _at least_ sure that it _still runs_ (that is particularly true if you insist on adding "use strict". Yikes, I thought this goes without saying!)
my %attributions = ();
my @files = ();
Non generic AB: l=6677230168510043648, t=1764
Generic AB: l=6677230168510043648, t=1739
Generic A+B: l=6677230168510043648, t=1750
Final ABClass: l=6677230168510043648, t=1760
Final APlusBClass: l=6677230168510043648, t=1743
Inline: l=6677230168510043648, t=1975
Non generic AB: l=6677230168510043648, t=2568
Generic AB: l=6677230168510043648, t=2585
Generic A+B: l=6677230168510043648, t=2627
<source lang="lisp">
(import '(ij IJ))
(def gold (IJ/openImage "http://rsb.info.nih.gov/ij/images/AuPbSn40.jpg"))
(.show gold)
</source>
#!/bin/sh
cd /usr/lib/fiji
url=http://pacific.mpi-cbg.de/update
curl $url/current.txt |
while read package date has
do
case $package in