Skip to content

Instantly share code, notes, and snippets.

Avatar

Nigel V Thomas nigel-v-thomas

View GitHub Profile
@nigel-v-thomas
nigel-v-thomas / App
Created Mar 31, 2013
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
View App
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 / pom.xml
Created Mar 28, 2012
Groovy Maven Eclipse working pom
View pom.xml
<?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 / osm_maps_downloader.py
Last active Aug 29, 2015 — forked from jessearmand/osm_maps_downloader.py
Download map tiles from MapQuest open street map source
View osm_maps_downloader.py
#!/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