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
# Fail2Ban action for reporting to badips.com | |
# | |
# Author: Robert Wohleb | |
# | |
[Definition] | |
# Option: actionstart | |
# Notes.: command executed once at the start of Fail2Ban. | |
# Values: CMD |
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
/* | |
* jQuery nap 1.0.0 | |
* www.frebsite.nl | |
* Copyright (c) 2010 Fred Heusschen | |
* Licensed under the MIT license. | |
* http://www.opensource.org/licenses/mit-license.php | |
*/ | |
(function($) { | |
$.fn.nap = function(fallAsleep, wakeUp, standbyTime) { |
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
print (lambda r,w,h:"\n".join("".join((" ","▲")[c] | |
for c in s)for s in reduce(lambda a,y:a+[[r>>(a[y][x-1]*4+a[y][x]*2+a[y][(x+ | |
1)%w])&1for x in range(w)]],range(h),[[0]*(w/2)+[1]+[0]*(w/2)])))(90,63,31) |
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
UUID = { | |
generateQuad : function() { | |
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); | |
}, | |
generateGuid : function() { | |
return (this.generateQuad() + this.generateQuad() + "-" | |
+ this.generateQuad() + "-" + this.generateQuad() + "-" | |
+ this.generateQuad() + "-" + this.generateQuad() + this.generateQuad() + this | |
.generateQuad()); | |
} |
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 | |
DIR="/path/to/big/files" | |
find $DIR -type f -exec md5sum {} \; | sort > /tmp/sums-sorted.txt | |
OLDSUM="" | |
IFS=$'\n' | |
for i in `cat /tmp/sums-sorted.txt`; do | |
NEWSUM=`echo "$i" | sed '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
wget http://pecl.php.net/get/xhprof-0.9.2.tgz | |
tar -xzf xhprof-0.9.2.tgz | |
cd xhprof-0.9.2/extension | |
/Applications/MAMP/bin/php5.3/bin/phpize | |
MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" | |
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET | |
./configure | |
make | |
cp modules/xhprof.so $(/Applications/MAMP/bin/php5.3/bin/php-config --extension-dir)/ | |
echo "extension=xhprof.so" >> /Applications/MAMP/conf/php5.3/php.ini |
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/python | |
# | |
# Memcache monitoring plugin for server density | |
# http://www.serverdensity.com/ | |
# | |
# Depends on python-memcached | |
# http://www.tummy.com/Community/software/python-memcached/ | |
# easy_install python-memcached | |
# | |
# based on: |
NewerOlder