Skip to content

Instantly share code, notes, and snippets.

Avatar
🛸
Technology!

Curtis Rueden ctrueden

🛸
Technology!
View GitHub Profile
@ctrueden
ctrueden / gist:1352276
Created Nov 9, 2011
Fiji daily build
View gist:1352276
git clean -x -d -f
git submodule foreach git clean -x -d -f
./Build.sh
./bin/make-app.py nojre linux64
tar cvf fiji-nojre.tar Fiji.app
jar cvf fiji-nojre.zip Fiji.app
@ctrueden
ctrueden / gist:1386332
Created Nov 22, 2011
Can "git rebase --onto" move commits to another branch?
View gist:1386332
: curtis@rook ~/code/LOCI/scifio (develop)
git st
# On branch develop
nothing to commit (working directory clean)
: curtis@rook ~/code/LOCI/scifio (develop)
echo hello >> pom.xml
: curtis@rook ~/code/LOCI/scifio (develop)
git st
# On branch develop
# Changes not staged for commit:
@ctrueden
ctrueden / KnipImageJ.java
Created Dec 11, 2011
How to load and invoke ImageJ2 plugins
View KnipImageJ.java
//
// KnipImageJ.java
//
/*
ImageJ software for multidimensional image processing and analysis.
Copyright (c) 2010, ImageJDev.org.
All rights reserved.
@ctrueden
ctrueden / OpsTyping.java
Created Feb 7, 2012
Typing seems OK here...
View OpsTyping.java
//
// OpsTyping.java
//
import net.imglib2.type.numeric.ComplexType;
import net.imglib2.type.numeric.RealType;
public class OpsTyping {
public <V extends ComplexType<V>> void complex(V arg) {
@ctrueden
ctrueden / Overflows.java
Created Feb 22, 2012
Benchmarks performance of several methods of detecting integer multiplication overflows.
View Overflows.java
//
// Overflows.java
//
import java.math.BigInteger;
/**
* Benchmarks performance of several methods of detecting integer overflows.
*
* @author Curtis Rueden
@ctrueden
ctrueden / gist:2144264
Created Mar 21, 2012
RealPoint constructors
View gist:2144264
/**
* Protected constructor that can re-use the passed position array.
*
* @param position
* array used to store the position.
* @param copy
* flag indicating whether to make a copy of the array.
*/
protected RealPoint( final double[] position, final boolean copy )
{
@ctrueden
ctrueden / ConstructorPerformance.java
Created Mar 21, 2012
Comparing RealPoint constructor implementations
View ConstructorPerformance.java
//
// ConstructorPerformance.java
//
public class ConstructorPerformance {
public static double x = 1, y = 2, z = 3;
public static void main(final String[] args) throws Exception {
final int iter = 10000000;
@ctrueden
ctrueden / gist:2220296
Created Mar 27, 2012
Example exception from license-maven-plugin 1.0
View gist:2220296
[WARNING] skip failed file : Could not extract header on file /Users/curtis/code/ImageJ/imagej/core/ext/src/test/java/imagej/ext/plugin/PluginDiscovery.java for reason copyright [Copyright (C) 2009 - 2012 Board of Regents of the University of
Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck
Institute of Molecular Cell Biology and Genetics.] is not valid
org.codehaus.mojo.license.header.InvalideFileHeaderException: Could not extract header on file /Users/curtis/code/ImageJ/imagej/core/ext/src/test/java/imagej/ext/plugin/PluginDiscovery.java for reason copyright [Copyright (C) 2009 - 2012 Board of Regents of the University of
Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck
Institute of Molecular Cell Biology and Genetics.] is not valid
at org.codehaus.mojo.license.UpdateFileHeaderMojo.processFile(UpdateFileHeaderMojo.java:776)
at org.codehaus.mojo.license.UpdateFileHeaderMojo.prepareProcessFile(UpdateFileHeaderMojo.java:689)
at org.codehaus.mojo.license.UpdateFileHe
@ctrueden
ctrueden / gist:2220389
Created Mar 27, 2012
Build failure when trying to install license-maven-plugin
View gist:2220389
: curtis@sirius ~/code/Maven/license-maven-plugin (fix-multi-line-copyright)
mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building License Maven Plugin 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ license-maven-plugin ---
[INFO]
@ctrueden
ctrueden / gist:2238895
Created Mar 29, 2012
I am an idiot who deserves public shame
View gist:2238895
: curtis@sirius ~/code/ImageJ/imglib (master)
find . -exec sed -i '' -e 's/^M//' {} \;
sed: .: in-place editing only works for regular files
sed: ./.git: in-place editing only works for regular files
sed: ./.git/hooks: in-place editing only works for regular files
sed: ./.git/info: in-place editing only works for regular files
sed: ./.git/logs: in-place editing only works for regular files
sed: ./.git/logs/refs: in-place editing only works for regular files
sed: ./.git/logs/refs/heads: in-place editing only works for regular files
sed: ./.git/logs/refs/remotes: in-place editing only works for regular files