Skip to content

Instantly share code, notes, and snippets.

View standardpixel's full-sized avatar

Eric Gelinas standardpixel

View GitHub Profile
@standardpixel
standardpixel / ecoengine-explore-holos-override
Created February 26, 2015 18:53
Recommendations and changes to better fit EcoEngine Explore into Holos
/* Bootstrap changes */
.span12 {
padding-top: 11px !important;
}
.col-md-12 {
z-index: 1;
width: 100vw;
margin: 0 0 0 -14px;
padding: 0;
@standardpixel
standardpixel / StandardPixelBase
Created December 21, 2014 21:57
A Javascript Superclass
StandardPixelBase() {
var that = this;
var listeners = {};
//
// Subscribes a function to an event called by fire
//
that.on = function on(type, callback, data, once) {
@standardpixel
standardpixel / ParksForward-Stories.markdown
Created October 15, 2014 16:43
A Pen by Eric Gelinas.
@standardpixel
standardpixel / JSModuleBoilerplate
Created September 5, 2014 00:16
JS module boilerplate for the browser
(function(exports){
})(typeof exports === 'undefined'? this['ModuleName']={}: exports);
@standardpixel
standardpixel / ScaleImageMapWithImage
Created July 2, 2014 01:06
Scale an image map with it's image
function ImageMap(map, img) {
var areas = $(map).find('area'),
coords = [],
self = this;
areas.each(function(n, area) {
coords[n] = area.coords.split(',');
});
@standardpixel
standardpixel / gist:6967378
Created October 13, 2013 21:00
Ngnix config file for a simple proxy over multiple node instances
events {
worker_connections 4096;
}
http {
server {
listen 80;
server_name "";
location / {
proxy_pass http://127.0.0.1:3000/;
@standardpixel
standardpixel / gist:3909193
Created October 18, 2012 00:34
A format for organizing tilesets by year and boundingbox.
/*
* This is the Format Flickr uses to organize OSM places by year and lat long.
* leaflet layers are uses this to show the appropriate layers
*
* This code example is provided to support my talk at State of the Map 2012
* "What the Flickr community can do for maps"
*/
var places = {
"types":{
"mapquest_osm": {
@standardpixel
standardpixel / Three step map zoom example
Created February 6, 2012 08:02
This is a simple library agnostic example of Flickr's three step map zoom.
/*
* This is a simple library agnostic example of Flickr's three step map zoom.
* In this example we are using the open mapquest static map api. Preloading
* of second and third map images can be done before mouseover to make their
* first display smoother.
*/
<style>
#map_container {
width:300px;
@standardpixel
standardpixel / edit_styles_inline
Created August 27, 2011 00:17
A bookmarklet for editing styles inline
javascript:(function()%7Bvar%20_etags=document.getElementsByTagName('style'),_etag=(_etags%5B0%5D)?_etags%5B0%5D.innerHTML:'No%20Style%20Tags%20Available%20To%20Preload',_ewin=window.open('','_ewin','height=300,width=600'),_edoc=_ewin.document;_edoc.write('%3Ctextarea%20id=%22_earea%22%20style=%22width:600px;height:300px;%22%3E'+_etag+'%3C/textarea%3E');var%20_earea=_edoc.getElementsByTagName('textarea')%5B0%5D;var%20_enewtag=document.createElement('div');document.getElementsByTagName('body')%5B0%5D.insertBefore(_enewtag,document.getElementsByTagName('body')%5B0%5D.firstChild);_enewtag.id='_enewtag';_earea.addEventListener('keyup',function()%7B_enewtag.innerHTML='%3Cstyle%3E'+_earea.value+'%3C/style%3E';%7D,false);%7D)();