$ 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
<?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
#!/bin/sh | |
# extend non-HiDPI external display on DP* above HiDPI internal display eDP* | |
# see also https://wiki.archlinux.org/index.php/HiDPI | |
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949 | |
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319 | |
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1` | |
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1` | |
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'` |
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
<!-- Bootstrap --> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> | |
<!-- Font Awesome --> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"> | |
<!-- Bootlint--> | |
<script src="//maxcdn.bootstrapcdn.com/bootlint/0.11.0/bootlint.min.js"></script> |