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
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
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
mysql -B -D prc_v2 -e 'select * from doctor where s_id in ( [] );' > _misc/doctors-pre-clean.tsv | |
mysql -B -D prc_v2 -e 'SELECT d_id, doctor.name, s_id, surgery.name, | |
(SELECT COUNT(p_id) FROM patient WHERE patient.d_id = doctor.d_id) AS num_patients | |
FROM prc_v2.doctor LEFT JOIN surgery ON doctor.s_id = surgery.id | |
ORDER BY s_id ASC , doctor.name ASC;' > _misc/doctors-post-clean.tsv | |
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 | |
// http://overpass-api.de/api/map?bbox=8.2102,47.2750,8.8570,47.5274 | |
// php render.php 8.2102,47.2750,8.8570,47.5274 | |
// $xtile = floor((($lon + 180) / 360) * pow(2, $zoom)); | |
// $ytile = floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) / 2 * pow(2, $zoom)); | |
define('METATILE', 8); |
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 | |
$apiKey = 'blah....blah'; | |
$headers = array(); | |
$headers[] = 'Content-Type: text/xml; charset=utf-8'; | |
$headers[] = 'User-Agent: PEAR::XML_RPC2/@package_version@'; // after "User-Agent: " anything is ok, just not empty or missing | |
$params = array($apiKey); |
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 | |
$url = '...'; | |
$client = new \SoapClient($url, array()); | |
if (!$client instanceof \SoapClient) | |
throw new Exception("Unable to get SOAP client"); |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Root PresetName="Ultimate Joystick"> | |
<KeyboardLayout>en-GB</KeyboardLayout> | |
<MouseXMode Value="" /> | |
<MouseXDecay Value="0" /> | |
<MouseYMode Value="" /> | |
<MouseYDecay Value="0" /> | |
<MouseReset> | |
<Primary Device="{NoDevice}" Key="" /> | |
<Secondary Device="{NoDevice}" Key="" /> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Root PresetName="Ultimate Keyboard Mouse"> | |
<KeyboardLayout>en-GB</KeyboardLayout> | |
<MouseXMode Value="Bindings_MouseRoll" /> | |
<MouseXDecay Value="0" /> | |
<MouseYMode Value="Bindings_MousePitch" /> | |
<MouseYDecay Value="0" /> | |
<MouseReset> | |
<Primary Device="{NoDevice}" Key="" /> | |
<Secondary Device="{NoDevice}" Key="" /> |
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
tar xf Sublime\ Text\ 2\ Build\ 2181\ x64.tar.bz2 | |
mv Sublime\ Text\ 2 sublime-text-2 | |
sudo mv sublime-text-2 /usr/local/lib/ | |
sudo ln -s /usr/local/lib/sublime-text-2 /usr/bin/sublime | |
sudo sublime /usr/share/applications/sublime.desktop | |
[Desktop Entry] | |
Version=1.0 | |
Name=Sublime Text 2 | |
GenericName=Text Editor |
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
<div id="carousel-overflow"> | |
<div id="carousel"> | |
<div id="carousel-inner"> | |
<div id="image_wrap"> | |
<a href="/offers/item/jubilee" rel="external"><img src="/uploads/assets/1641b91ef3.jpg" width="1300" height="341" id="slideshow-image-default" alt="Hotel Offers & Deals, Short Breaks in England Scotland Wales" /></a> | |
</div> | |
<div class="scrollable-numbers"> | |
<div class="scrollable2"> | |
<div class="items2"> | |
<div> |
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
// $Id: jquery.pod1.fade.js 1206 2011-01-14 09:00:53Z tedme $ | |
/** | |
* Pod1Fade | |
* Tom Edme & Hannah Stothard | |
* Nov 2010. | |
*/ | |
(function ($) { |