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
(function() { | |
function strToAmount(str) { | |
var parts = str.trim().match(/^£(\d+\.\d{2})(-)?/); | |
if (!parts) return 0; | |
return +(+parts[1] * (parts[2]?-1:1)).toFixed(2); | |
} | |
function amountToStr(amount) { | |
amount = amount.toFixed(2); | |
if (amount < 0) { |
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 | |
# Script to reboot netgear DG834G router | |
# Tried this only on v5, may work on others. | |
IP=192.168.1.1 | |
USER=admin | |
PASSWORD=password | |
curl --user $USER:$PASSWORD $IP/reboot.cgi >/dev/null 2>&1 |
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 | |
# Shell script to update namecheap.com dynamic dns | |
# for a domain to your external IP address | |
HOSTNAME=yoursubdomain | |
DOMAIN=yourdomainname.com | |
PASSWORD=y0urp455w0rd | |
IP=`curl -s echoip.com` |