The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
/*! | |
* JavaScript - loadGoogleMaps( version, apiKey, language, sensor ) | |
* | |
* - Load Google Maps API using jQuery Deferred. | |
* Useful if you want to only load the Google Maps API on-demand. | |
* - Requires jQuery 1.5 | |
* | |
* UPDATES by Gavin Foley | |
* - Tidied JS & made it JSLint compliant | |
* - Updated script request to Google Maps API to be protocol relative |
(?:<tag>)([\s\S]+?)(?:</tag>) |
/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */ | |
.vertical-align { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} | |
/* with vendor prefixes */ | |
.vertical-align { | |
position: relative; |
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
# | |
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ | |
# |
This example uses d3.geo.bounds to draw a diagonal line for the bounding box for each county.
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |
#!/bin/sh | |
# | |
# Runs script, and prints a notification with growl when it finishes | |
# | |
# Written sometime in 2006, posted 2007/08 | |
# | |
# With Tips from Ranger Rick, Tim Bunce and Ruben Fonseca | |
# | |
# Run the command, including arguments with spaces |
#!/bin/sh | |
# adapted from: https://github.com/bingalls/webGraphicsMagick/blob/master/compressLossy.sh | |
COMPRESS_DIR='./compressed' #Creates compressed copies in $COMPRESS_DIR. | |
#Create dest dir for compressed copies of images | |
if [ ! -d $COMPRESS_DIR ];then | |
mkdir $COMPRESS_DIR | |
else | |
#read -t15 is bash for timeout of 15 seconds |