Skip to content

Instantly share code, notes, and snippets.

View nigel-v-thomas's full-sized avatar

Nigel V Thomas nigel-v-thomas

View GitHub Profile
@nigel-v-thomas
nigel-v-thomas / osm_maps_downloader.py
Last active August 29, 2015 14:26 — forked from jessearmand/osm_maps_downloader.py
Download map tiles from MapQuest open street map source
#!/usr/local/bin/python
from sys import argv
import os
import math
import urllib2
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
@nigel-v-thomas
nigel-v-thomas / pom.xml
Created March 28, 2012 15:00
Groovy Maven Eclipse working pom
<?xml version="1.0" encoding="UTF-8"?>
<!--
Generated from archetype; please customize.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.york.cserv.wsg.groovy.onlinedirectory</groupId>
@nigel-v-thomas
nigel-v-thomas / App
Created March 31, 2013 13:28
Measures the maximum observed drift between the millisecond timer and the nano timer (which will usually be provided by Time Stamp Counter). Src - "The Well-Grounded Java Developer" (Listing 6.1, pg. 165), see related post on java simon google group http://goo.gl/GL4qOR
package uk.me.nvt.PerformanceNanoTimeDrift;
/**
* Measures the maximum observed drift between the millisecond timer and the nano timer
* (which will usually be provided by Time Stamp Counter).
* Src - "The Well-Grounded Java Developer" (Listing 6.1, pg. 165)
*/
public class App {
public static void main(String[] args) {
System.out.println("Hello World!");
@nigel-v-thomas
nigel-v-thomas / script.js
Last active April 24, 2023 11:39
Contact Form 7 Redirecting to another URL after submissions - use this alternative to fix issue where form redirects before send is complete
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
setTimeout(function(){
window.location.href = 'https://example.com/thank-you/';
}, 5000);
}, false );
</script>