This file contains hidden or 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 {log} from "./log"; | |
export class App { | |
constructor() { | |
log.info("Starting application"); | |
// Set up the websocket | |
const ws_scheme = window.location.protocol == "https:" ? "wss" : "ws"; | |
const ws_path = ws_scheme + '://' + window.location.host + "/chat/stream/"; | |
this.ws = new WebSocket(ws_path); | |
this.ws.onmessage = this.onWSEvent; |
This file contains hidden or 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 express = require('express'); | |
var nunjucks = require('nunjucks'); | |
var bodyParser = require('body-parser'); | |
var cookieParser = require('cookie-parser') | |
var session = require('express-session') | |
var passport = require('passport'); | |
var LocalStrategy = require('passport-local').Strategy; | |
var db = require('./db'); | |
passport.use(new LocalStrategy( |
This file contains hidden or 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
from xml.sax.handler import ContentHandler | |
import os | |
import codecs | |
from xml.sax.saxutils import escape | |
class OSMHandler(ContentHandler): | |
"""This is a base OSMHandler class which sets up the XML parsing, etc. | |
You will want to override the selectElement and transformElement | |
functions""" |
This file contains hidden or 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 python | |
"""Script to upload contents of an mbtile to an s3 storage bucket""" | |
from boto.s3.connection import S3Connection | |
import sqlite3 | |
import sys | |
import os | |
import progressbar | |
import threading |