This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.6 | |
# This script "unsubmodulizes" a git repository - i.e. it takes a git | |
# repository with submodules and replaces the submodules with the | |
# history of the submodule merged into a subdirectory of the same | |
# name. I knocked this up quickly as an answer to this stackoverflow | |
# question: | |
# | |
# http://stackoverflow.com/questions/4542729/undo-submodulization-in-git | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import '(ij.io DirectoryChooser)) | |
(import '(java.io File)) | |
(import '(java.io FileWriter)) | |
(import '(ij.plugin FolderOpener)) | |
(import '(ij IJ)) | |
(import '(ij.io FileSaver)) | |
;; d should be a java.io.File object | |
(defn files-in-directory [d] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.1 | |
# This is script that extracts the trees of two commits to temporary | |
# directories and then runs meld on both directories, so you can compare | |
# them using meld's nice recursive browsing interface. | |
# | |
# This is for an answer to this question: | |
# http://stackoverflow.com/questions/2006032/view-differences-of-branches-with-meld | |
from subprocess import call, Popen, PIPE, check_call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.1 | |
from subprocess import call, Popen, PIPE, check_call | |
import re | |
import sys | |
import os | |
import errno | |
# !! n.b. You probably shouldn't be using this - it's vastly faster and safer to use | |
# one of the other methods mentioned here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.1 | |
import sys | |
import os | |
import urllib.parse | |
from subprocess import call | |
if len(sys.argv) != 2: | |
print("Usage: {} [FILE-OR-DIRECTORY]".format(sys.argv[0]),file=sys.stderr) | |
sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Polar_Transformer.original.java 2008-03-10 21:52:08.000000000 +0100 | |
+++ Polar_Transformer.java 2010-06-25 15:27:13.171811587 +0200 | |
@@ -73,37 +73,56 @@ | |
if (showDialog(ipInitial)) | |
{ | |
- | |
- widthInitial = ipInitial.getWidth(); | |
- heightInitial = ipInitial.getHeight(); | |
- if (ipInitial instanceof ColorProcessor) isColor = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.1 | |
import sys | |
import re | |
import tempfile | |
from subprocess import call, check_call | |
import os | |
def print_usage(): | |
print("Usage: {} user@host".format(sys.argv[0])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git log --format="%an"|sort|uniq | |
fjmd1 | |
frabcus | |
goatchurch | |
heathd | |
louise | |
mark | |
sams | |
solidgoldpig | |
sym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.5 | |
# This script attempts to take a PDF file and split it into two PDF | |
# files, one of which has all the images and the other which has | |
# everything else. You can select pages by whether they contain | |
# /Subtype /Image (bitmaps in my case) or /XObject which seems to | |
# catch bitmaps and included PDF files (which are most diagrams | |
# exported to PDF in my case). | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -ne 1 ] | |
then | |
echo Usage: $0 "<path-to-download.emx>" | |
exit 1 | |
fi | |
for i in $(xml_grep 'TRACKURL' $1|sed 's/.*\(http.*mp3\).*/\1/'|egrep http) | |
do |