$ uname -r
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
[{ | |
"city": "Auckland", | |
"latitude": -36.850, | |
"longitude": 174.760 | |
}, | |
{ | |
"city": "Manukau", |
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
# add another repo to push to all | |
git remote add all git://original/repo.git | |
git remote set-url --add --push all git://original/repo.git | |
git remote set-url --add --push all git://mirror-second/repo.git | |
git push all | |
# add to origin | |
git remote set-url --add --push origin git://original/repo.git | |
git remote set-url --add --push origin git://mirror-second/repo.git |
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
<?php | |
function convertCurrency($amount, $from, $to){ | |
$data = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from&to=$to"); | |
preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted); | |
$converted = preg_replace("/[^0-9.]/", "", $converted[1]); | |
return number_format(round($converted, 3),2); | |
} | |
echo convertCurrency("10.00", "GBP", "USD"); |
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
code --install-extension HookyQR.beautify | |
code --install-extension Kasik96.format-php | |
code --install-extension RolandGreim.sharecode | |
code --install-extension Shan.code-settings-sync | |
code --install-extension Tobiah.unity-tools | |
code --install-extension Unity.unity-debug | |
code --install-extension aaron-bond.better-comments | |
code --install-extension christian-kohler.npm-intellisense | |
code --install-extension chrmarti.regex | |
code --install-extension codezombiech.gitignore |
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
<?php | |
/** | |
* User: luke hardiman | |
* Date: 2/20/15 | |
* Time: 11:23 PM | |
* @Description : Handy json output class | |
*/ | |
namespace Api; | |
class Response |
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 | |
echo "Usage: dbdiff [user1:pass1@dbname1] [user2:pass2@dbname2] [ignore_table1:ignore_table2...]" | |
dump () { | |
up=${1%%@*}; user=${up%%:*}; pass=${up##*:}; dbname=${1##*@}; | |
mysqldump --opt --compact --skip-extended-insert -u $user -p$pass $dbname $table > $2 | |
} | |
rm -f /tmp/db.diff |
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
<?php | |
class wholesalesms { | |
var $api_key; | |
var $secret; | |
var $end_point; | |
public function wholesalesms($api_key,$secret,$end_point = 'https://app.wholesalesms.com.au/api/v2/'){ | |
$this->api_key = $api_key; | |
$this->secret = $secret; | |
$this->end_point = $end_point; |
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
#add to profile or just run | |
export TERM=xterm |
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
brew install http://git.io/sshpass.rb |
NewerOlder