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 java.io.File; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.sun.media.jai.codec.TIFFField; | |
public class TiffSet { | |
public static void main(String[] args) { |
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
/** | |
* Convert a byte count into a human readable, rounded String using kB, MB, | |
* etc. This is base-1000 and not base-1024. | |
* | |
* @param size number of bytes | |
* @return formatted String | |
*/ | |
private static String readableSize(long size) { | |
if (size <= 0) { | |
return "0 B"; |
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/bash | |
# | |
# Convert git log into changelog in Debian format | |
# | |
# Tags in format 1.2.3-4 become version entries. Log entries between them | |
# become changelog entries. Merge commits are not excluded, so you probably | |
# have to clean up the result manually. | |
RE_VERSION='^v\?[0-9]\+\([.-][0-9]\+\)*' | |
# Assume the name of the current directory is the package name |
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 | |
od -c -t x1 "$@" |
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 | |
echo 0 | gdb -batch-silent -ex "run" -ex "set logging overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex "set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo backtrace:\n" -ex "backtrace full" -ex "echo \n\nregisters:\n" -ex "info registers" -ex "echo \n\ncurrent instructions:\n" -ex "x/16i \$pc" -ex "echo \n\nthreads backtrace:\n" -ex "thread apply all backtrace" -ex "set logging off" -ex "quit" --args "$@" |
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 hudson.util.RemotingDiagnostics; | |
script = 'def proc = "ls -1 /media".execute(); proc.waitFor(); println proc.in.text'; | |
for (slave in Jenkins.instance.slaves) { | |
println slave.name; | |
try { | |
println RemotingDiagnostics.executeGroovy(script, slave.getChannel()); | |
} catch (all) { | |
all.printStackTrace(); |
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 | |
find -type f -printf '%s\n' | awk '{s+=$1} END {print s}' |
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/bash -e | |
# Grabs the NASA image of the day by RSS feed and updates the gnome | |
# background. add this to your cron jobs to have this happen daily. this is, | |
# obviously, a hack, that is likely to break at the slightest change of NASA's | |
# RSS implementation. yay standards! | |
# | |
# Source: https://awesome.naquadah.org/wiki/NASA_IOTD_Wallpaper | |
FEED='http://www.nasa.gov/rss/lg_image_of_the_day.rss' |
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 | |
MOUNTPOINT=/mnt/backup | |
notify() { | |
returncode=$1 | |
summary=$2 | |
message=$3 | |
if [ $returncode -gt 0 ]; then |
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
unique(map(heap.objects("org.apache.avalon.framework.configuration.ConfigurationException"), "it.detailMessage.toString()")) |