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 | |
#set username and password for authentication | |
user=transmission | |
password=transmission | |
host=127.0.0.1 | |
port=9091 | |
# get the list of 100% Done and Stopped or Finished torrents. the last sed command removes the * from a torrent id that indicates an error. | |
list=$(transmission-remote $host:$port --auth=$user:$password --list | sed -e '1d;$d;s/^ *//' | grep -e '100%.*Done.*\(Stopped\|Finished\)' | cut --only-delimited --delimiter=' ' --field=1 | 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
#!/bin/bash | |
# original: https://github.com/AntonioCS/no-ip.com-bash-updater/blob/master/noipupdater.sh | |
# this file: https://gist.github.com/rolfvreijdenberger/af6b2a7527263b8c8200 | |
# more info on no-ip.com api: http://www.noip.com/integrate/request | |
# usage: | |
# 1. put it somewhere in your filesystem | |
# 2. make the file executable | |
# 3. adjust the parameters provided below: |
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
;file: /etc/php5/mods-available/xdebug.ini | |
;cd /etc/php5/conf.d/ && ln -s ../mods-available/xdebug.ini xdebug.ini | |
zend_extension=/usr/lib/php5/20121212/xdebug.so | |
;the next lines were added, so they are enabled for each php environment | |
;like cli and apache2 and we don't have to add that to their specific env settings | |
;in /etc/php5/<apache2|cli>/php.ini | |
;this file is /etc/php5/mods-available/xdebug.ini and it is actived | |
;by the symlink in /etc/php5/conf.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
#!/bin/bash | |
# /usr/local/bin/phpunit-debug | |
# a wrapper around phpunit with xdebug enabled for eclipse | |
# make sure the debug session is started in the debug client (eclipse, netbeans, choose one of the settings below) | |
# see component diagram on https://en.wikipedia.org/wiki/Xdebug | |
# export XDEBUG_CONFIG="idekey=ECLIPSE_DBGP" | |
export XDEBUG_CONFIG="idekey=netbeans-xdebug" | |
phpunit --colors $@ |
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 | |
# creates a private key from a 'brain wallet' | |
if [ -z "$1" ]; then | |
echo "provide the bitcoin brain wallet seed to get the private key:"; | |
read SEED; | |
else | |
SEED=$1; | |
fi | |
echo "seed (brain wallet): $SEED"; | |
echo -n "bitcoin private key: "; |
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
size=`wc -c test.txt | cut -f6 -d" "` && while true; do echo -n "x"; done | dd of=~/test.txt bs=$size count=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
/** | |
* gets the constants from a class. this is useful if the constants are part | |
* of a logical group (especially when prefixed with the same value) | |
* @param string $from the classname (can be __CLASS__) | |
* @param string $prefix the prefix for the constants | |
* @param string $values_only do we want a key=>value array or values only | |
* @return array | |
*/ | |
public static function getConstants($from, $prefix = null, $values_only = false) | |
{ |
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
package nl.vreijdenberger.tests.fixtures; | |
import java.math.BigInteger; | |
import java.net.URL; | |
import java.security.SecureRandom; | |
import java.util.Set; | |
import java.util.concurrent.TimeUnit; | |
import nl.vreijdenberger.model.Registry; |