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 | |
#============================================================================== | |
#TITLE: mysql_backup.sh | |
#DESCRIPTION: script for automating the daily mysql backups on development computer | |
#AUTHOR: tleish | |
#DATE: 2013-12-20 | |
#VERSION: 0.4 | |
#USAGE: ./mysql_backup.sh | |
#CRON: | |
# example cron for daily db backup @ 9:15 am |
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
<?php | |
function convertCurrency(float $amount, string $from, string $to){ | |
$data = file_get_contents("https://finance.google.com/finance/converter?a={$amount}&from={$from}&to={$to}"); | |
preg_match("/<span class=bld>([0-9\.]+) " . $currency_to . "<\/span>/", $data, $matches); | |
return (float)$matches[1]; | |
} | |
echo convertCurrency(10.00, "GBP", "USD"); |
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
/** | |
* TabContainer with tabs aligned to the right | |
* @require dijit/layout/TabContainer | |
* @author ComExpertise SARL <https://www.comexpertise.com> | |
* @tutorial http://stackoverflow.com/questions/9433707/is-it-possible-to-align-dijit-layout-tabcontainer-tabs-to-the-right | |
* @version 1.0.0 | |
*/ | |
define([ | |
"dijit/layout/TabContainer", | |
"dojo/_base/declare", |