git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| <?php | |
| /** | |
| * PostGIS to GeoJSON | |
| * Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc. | |
| * | |
| * @param string $geotable The PostGIS layer name *REQUIRED* | |
| * @param string $geomfield The PostGIS geometry field *REQUIRED* | |
| * @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)* | |
| * @param string $fields Fields to be returned *OPTIONAL (If omitted, all fields will be returned)* NOTE- Uppercase field names should be wrapped in double quotes | |
| * @param string $parameters SQL WHERE clause parameters *OPTIONAL* |
| #!/usr/bin/python | |
| # README | |
| # | |
| # This script is from: https://gist.github.com/1953554 | |
| # By Nathaniel Vaughn Kelso and Mike Migurski @ Stamen | |
| # | |
| # Based on script by andrewharvey: https://gist.github.com/1675606 | |
| # | |
| # This script should be considered CC0 licensed |
| # Making maps with reduce() | |
| from matplotlib import pyplot | |
| from descartes import PolygonPatch | |
| from fiona import collection | |
| BLUE = '#6699cc' | |
| def render(axes, rec): | |
| """Given matplotlib axes and a record, adds the record as a patch |
| '''Provides utility functions for encoding and decoding linestrings using the | |
| Google encoded polyline algorithm. | |
| ''' | |
| def encode_coords(coords): | |
| '''Encodes a polyline using Google's polyline algorithm | |
| See http://code.google.com/apis/maps/documentation/polylinealgorithm.html | |
| for more information. | |
| # Workflow from https://github.com/necolas/dotfiles | |
| # Add the new submodule | |
| git submodule add git://example.com/remote/path/to/repo.git vim/bundle/one-submodule | |
| # Initialize the submodule | |
| git submodule init | |
| # Clone the submodule | |
| git submodule update | |
| # Stage the changes | |
| git add vim/bundle/one-submodule |
| #!/usr/bin/env python | |
| """ | |
| simple example script for running and testing notebooks. | |
| Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]` | |
| Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook. | |
| """ | |
| # License: Public Domain, but credit is nice (Min RK). |
| import SimpleHTTPServer | |
| class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. | |
| This sends the response code and MIME headers. | |
| Return value is either a file object (which has to be copied | |
| to the outputfile by the caller unless the command was HEAD, | |
| and must be closed by the caller under all circumstances), or |
| <?php | |
| echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/'); | |
| /* For example | |
| http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/ | |
| Would return: | |
| http://tinyurl.com/d4px9f | |
| */ | |
| ?> |