Keypress | Command |
---|---|
⌘ + X | Delete line |
⌘ + ↩ | Insert line after |
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
// Prototypal inheritance gotcha | |
var myProto = { | |
prop1: 'foo', | |
prop2: { | |
name: 'bar' | |
} | |
} | |
var obj1 = Object.create(myProto); |
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
import json | |
from .models import MyModel | |
def get_json(request): | |
# Return JSON for filtered MyModel objects | |
records = MyModel.objects.filter(myproperty=myvalue) |
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
// primitive vs complex numbers | |
var nrComp = new Number(3); | |
var nrPrim = Number(3); | |
nrComp; | |
nrPrim; | |
nrComp === nrPrim; | |
nrComp == nrPrim; | |
typeof nrComp; | |
typeof nrPrim; |
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
// The GeoJSON object | |
// | |
// { | |
// "type": "FeatureCollection", | |
// "features": [ | |
// { | |
// "type": "Feature", | |
// "geometry": { | |
// "type": "Point", | |
// "coordinates": [42.3875, -71.1] |
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
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ 0, 0 ] | |
}, | |
"properties": { | |
"name": "NAME", | |
"bounded_box": { | |
"southwest": { |
Feb 19th, 2013 @ MAPC
The Metropolitan Area Planning Council (MAPC) is a regional planning agency serving the people who live and work in the 101 cities and towns of Metropolitan Boston. Our mission is promoting smart growth principles and regional collaboration.
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
server { | |
listen 80; | |
server_name mydomain.org; | |
root /var/www; | |
access_log off; | |
error_log /home/user/geonode/log/nginx_error.log; |