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
<script type="application/ld+json"> | |
{{ if .IsPage }}{ | |
"@context": "http://schema.org", | |
"@type": "BlogPosting", | |
"headline": "{{ .Title }}", | |
"genre": "{{ range .Params.categories }}{{ . }}{{ end }}", | |
"url": "{{ .Permalink }}", | |
"datePublished": "{{ (time .Date).Format "2006-01-02T15:04:05-0700" | safeHTML }}", | |
"description": "{{ .Summary }}", | |
"author": { |
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 | |
# DB Backup Script | |
# Backup a MySql Database Script using mysqldump, pv, gzip and curl. | |
# Will dump the entire contents of a database into a gzipped file. | |
# Options: | |
# Database credentials | |
DBUSER="" |
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
1 | Aberdeenshire | |
---|---|---|
2 | Angus | |
3 | Argyll and Bute | |
4 | Bath and North East Somerset | |
5 | Bedfordshire | |
6 | Berkshire | |
7 | Blaenau Gwent | |
8 | Bridgend | |
9 | Buckinghamshire | |
10 | Caerphilly |
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 | |
// https://devcenter.heroku.com/articles/cleardb#using-cleardb-with-python-django | |
$url=parse_url(getenv("CLEARDB_DATABASE_URL")); | |
$server = $url["host"]; | |
$username = $url["user"]; | |
$password = $url["pass"]; | |
$db = substr($url["path"],1); |
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://stackoverflow.com/questions/17035859/how-to-find-php-execution-time | |
sleep(1); | |
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]; | |
echo "Process Time: {$time}"; | |
// Process Time: 1.0061590671539 |
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
import java.awt.Rectangle; | |
import java.awt.Robot; | |
import java.awt.Toolkit; | |
import java.awt.image.BufferedImage; | |
import java.awt.Desktop; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
public class Main { |