This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' | |
# triple space a file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# ircecho.py | |
# Copyright (C) 2011 : Robert L Szkutak II - http://robertszkutak.com | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// bootstrap code | |
var myApp = angular.module('myApp', []); | |
//// resource def | |
var pops; | |
pops = function($resource) { | |
return $resource('/pops/:id', {}, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license AngularJS | |
* (c) 2010-2012 AngularJS http://angularjs.org | |
* License: MIT | |
*/ | |
/** | |
* Backward compatibility module for AngularJS | |
* @author Vojta Jina <vojta.jina@gmail.com> | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map; | |
var initMap = function() { | |
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png'; | |
var subdomains = ['', 'a.', 'b.', 'c.']; | |
var provider = new MM.TemplatedLayer(template, subdomains); | |
map = new MM.Map('map', provider, null, [ | |
new MM.MouseWheelHandler(null, true) | |
]); |
##Two Maps
Experiment in synching two maps together.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tile server using the node web framework Express (http://expressjs.com). | |
var app = require('express').createServer(); | |
var tilelive = require('tilelive'); | |
require('tilelive-mapnik').registerProtocols(tilelive); | |
var filename = __dirname + '/' + 'stylesheet.xml'; | |
tilelive.load('mapnik://' + filename, function(err, source) { | |
if (err) throw err; | |
app.get('/:z/:x/:y.*', function(req, res) { | |
source.getTile(req.param('z'), req.param('x'), req.param('y'), function(err, tile, headers) { | |
// `err` is an error object when generation failed, otherwise null. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
OlderNewer