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
exiftool -r -d %s -tagsfromfile "%d/%F.json" \ | |
"-GPSAltitude<GeoDataAltitude" \ | |
"-GPSLatitude<GeoDataLatitude" \ | |
"-GPSLatitudeRef<GeoDataLatitude" \ | |
"-GPSLongitude<GeoDataLongitude" \ | |
"-GPSLongitudeRef<GeoDataLongitude" \ | |
"-Keywords<Tags" \ | |
"-Subject<Tags" \ | |
"-Caption-Abstract<Description" \ | |
"-ImageDescription<Description" \ |
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
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
auto wlan0 | |
iface wlan0 inet dhcp | |
wpa-ssid "Your Network SSID" | |
wpa-psk "Your Password" |
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 | |
# (optional) You might need to set your PATH variable at the top here | |
# depending on how you run this script | |
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Hosted Zone ID e.g. BJBK35SKMM9OE | |
ZONEID="enter zone id here" | |
# The CNAME you want to update e.g. hello.example.com |
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 | |
// create a new S3 instance | |
$s3 = new S3('my access key', 'my secret key'); | |
// start the timer | |
StopWatch::start(); | |
// read & send the file | |
$f = $s3->inputFile('file_to_upload.zip'); | |
$r = $s3->putObject($f, 'my-bucket-name', 'uploaded_file.zip', S3::ACL_PUBLIC_READ); | |
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 | |
// start the timer | |
StopWatch::start(); | |
// sleep for 2 seconds | |
sleep(2); | |
// check how long 2 seconds is... | |
echo "Elapsed time: " . StopWatch::elapsed() . " seconds"; | |
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 | |
header("Content-Type: text/plain"); | |
function my_error_handler($num, $err, $file, $line) { | |
echo "Error Occurred: $err\n"; | |
} | |
set_error_handler('my_error_handler', E_ALL); | |
try { |
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 StopWatch { | |
/** | |
* @var $start float The start time of the StopWatch | |
*/ | |
private static $startTimes = array(); | |
/** | |
* Start the timer | |
* |