Skip to content

Instantly share code, notes, and snippets.

View dbburgess's full-sized avatar

Daniel Burgess dbburgess

View GitHub Profile
@dbburgess
dbburgess / toTrimOrNotToTrimToday.py
Created November 21, 2013 17:13
In the event you only trim your fingernails "every morning that the date is a prime number and the day of the week is named after a Norse deity," then this is a simple script to help you decide whether you should trim them or not.
import datetime
# Check whether number is prime
# Source: http://www.cs.armstrong.edu/liang/py/html/PrimeNumberFunction.html
def isPrime(number):
divisor = 2
while divisor <= number / 2:
if number % divisor == 0:
# If true, number is not prime
return False # number is not a prime
@dbburgess
dbburgess / gmaps-marker-example.html
Last active December 11, 2015 13:59
A simple example of using the Google Maps API (v3) to place pins where the user clicks on the map, and then get the coordinates of that location. Simply hover over the marker with your mouse to see the coordinates.
<!DOCTYPE html>
<html>
<head>
<title>Simple Google Maps Marker Creation Example</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style type="text/css">
html, body {
height: 100%;
margin: 0;