View update
This file contains 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 | |
refname="$1" | |
oldrev="$2" | |
newrev="$3" | |
function test_exif { | |
local commit="$1" path="$2" | |
echo "${path}" | egrep -iq '\.(jpe?g|png)$' || return 0 |
View z_skipplugins
This file contains 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
# -*- mode: perl -*- | |
# vim: syntax=perl | |
# | |
# https://88171.net/blosxom-skipplugins-plugin | |
package z_skipplugins; | |
use strict; | |
use warnings; | |
my %skip = ( |
View cacheentries
This file contains 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
# -*- mode: perl -*- | |
# vim: syntax=perl | |
# | |
# https://88171.net/blosxom-cacheentries-plugin | |
package cacheentries; | |
use Storable qw(lock_store lock_retrieve); | |
use File::stat; | |
use strict; |
View more
This file contains 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
# -*- mode: perl -*- | |
# vim: syntax=perl | |
# | |
# https://88171.net/blosxom-more-plugin | |
package more; | |
use strict; | |
use warnings; | |
our $truncated = 0; |
View set-file-times
This file contains 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/perl | |
use strict; | |
use warnings; | |
# Based on git-set-file-times in Git SCM Wiki | |
# https://git.wiki.kernel.org/index.php/ExampleScripts | |
# | |
# Sets mtime and atime of files to the latest author time in git. | |
# | |
# This is useful after the first clone of the rsync repository BEFORE you |
View gist:2a4e9b383cea678e363c8a02e1041ea5
This file contains 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 | |
target="$1" | |
if [ ! -f "$target" ]; then | |
echo >&2 "Usage: $0 file" | |
exit 1 | |
fi | |
suffix=`basename "$target" | sed 's/^.*\.//'` | |
temp=`mktemp --tmpdir=. temp-XXXXXXXXXX.$suffix` |
View gist:8ce2cbfce1cca01cdbf9
This file contains 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 | |
junkdir=${1:-~/Maildir/.Junk} | |
find $junkdir/cur -type f -name '*:2*' | while read file; do | |
while :; do | |
bogofilter < $file | |
case $? in | |
1|2) # 1 for non-spam; 2 for unsure | |
echo >&2 "learning as spam: `basename $file`" |
View FreeNAS-9.2.1.5, RAID-Z1, randrw, 500MB
This file contains 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
fio: this platform does not support process shared mutexes, forcing use of threads. Use the 'thread' option to get rid of this warning. | |
RandomRW: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1 | |
fio-2.0.15 | |
Starting 1 process | |
RandomRW: Laying out IO file(s) (1 file(s) / 500MB) | |
RandomRW: (groupid=0, jobs=1): err= 0: pid=4355: Sun May 25 13:41:57 2014 | |
read : io=256348KB, bw=44785KB/s, iops=11196 , runt= 5724msec | |
clat (usec): min=1 , max=37 , avg= 2.42, stdev= 1.17 | |
lat (usec): min=1 , max=37 , avg= 2.52, stdev= 1.25 |