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
http://lists.freebsd.org/pipermail/freebsd-stable/2011-October/064321.html | |
uname -a | |
FreeBSD odin 8.1-RELEASE-p5 FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 16:49:00 UTC 2011 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 | |
sed -i '' -e 's/=_/=%@_/' /usr/sbin/freebsd-update | |
freebsd-update upgrade -r 9.0-RC3 | |
freebsd-update install |
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 | |
# Authenticate an facebook application directly from shell. | |
# Make sure to modify the EMAIL and PASS below and just run it as: | |
# sh facebook-login.sh "<your facebook url>" | |
# | |
# It's possible to script and run the script in a while loop (In my case this is necessary hence | |
# the facebook-sdk api for php causes random crashes and my script needs to run for a loooong time. | |
# | |
# for a in a b c d e f g i j k l m n o p; do while (true); do START=`date +%s`; sh facebook-login.sh "<your app url>"; expr `date +%s` \< \( $START + 20 \) > /dev/null && break; done; sleep 30; done |
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
Type the following in a Terminal window: | |
$ sudo hdiutil convert -format UDSB -encryption AES-128 -o <new.sparsebundle> <old.sparsebundle> | |
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
/* | |
* The idea is to test against the value $max_allowed_packet (in bytes) | |
* and make sure our sql don't get bigger than that. | |
* Before executing our query (the bigger INSERT the less overhead. | |
*/ | |
// $rows is an array containing the rows to insert | |
while(count($rows)) { | |
$sql = "INSERT IGNORE INTO `table` VALUES ". | |
implode(',',array_splice($rows,0,25000)). |
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
Test |
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 | |
API_KEY="" | |
EMONCMS_API_KEY="" | |
FEED="https://api.xively.com/v2/feeds/ID" | |
OUT_URL="http://api.wunderground.com/weatherstation/WXCurrentObXML.asp?ID=IBLEKING8" | |
OUT=""; | |
function temp_crc { |
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
diff --git a/sickbeard/providers/hdbits.py b/sickbeard/providers/hdbits.py | |
index 229188f..48cda61 100644 | |
--- a/sickbeard/providers/hdbits.py | |
+++ b/sickbeard/providers/hdbits.py | |
@@ -57,7 +57,7 @@ class HDBitsProvider(generic.TorrentProvider): | |
def _doSearch(self, search_params, show=None): | |
- response = json.loads(self.getURL(url=self.search_url, json=search_params))['data'] | |
+ response = json.loads(self.getJSON(url=self.search_url, json=search_params))['data'] |
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
{"ec_likes":{ | |
"data":[ | |
{ | |
"id":"1180215580", | |
"name":"Eileen Rodrigues" | |
}, | |
{ | |
"id":"100002994927139", | |
"name":"Princess Mononoke" | |
}, |
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 | |
for IMG in `find . -iname \*.img`; do | |
DIR=`dirname $IMG` | |
basename ${IMG%.img} | |
/Applications/MakeMKV.app/Contents/MacOS/makemkvcon --minlength=600 mkv iso:${IMG} all `dirname ${IMG}` | |
#rename | |
for MKV in `ls $DIR/title*.mkv`; do | |
F=`basename ${MKV}` |
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
<? | |
addToArchive(); | |
function addToArchive() { | |
$path = '/home/fer/SocialCrawler/'; | |
$archiveDir = '/tmp/phar/'; | |
$files = glob($path."*.json", GLOB_NOSORT); | |
//Create array of archives to compress to. | |
$archives = array(); | |
foreach(array_map("stripPath", $files) as $row) { | |
$key = strstr($row,'_',true); |
OlderNewer