Mapping of Toronto Neighbourhoods with TopoJSON and D3.js
- View on Bl.ocks.org
- TopoJSON, GeoJSON and Shp files of Toronto neighbourhoods can be found in my repo jasonicarter
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name domain.com; | |
| # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. | |
| return 301 https://$host$request_uri; | |
| } |
| function monitorEvents(element) { | |
| var log = function(e) { console.log(e);}; | |
| var events = []; | |
| for(var i in element) { | |
| if(i.startsWith("on")) events.push(i.substr(2)); | |
| } | |
| events.forEach(function(eventName) { | |
| element.addEventListener(eventName, log); | |
| }); |
| # ------------------------------------------------------------------------------ | |
| # Description | |
| # ----------- | |
| # | |
| # Insert `ALL_PROXY=socks5://server:port` before the command by pressing | |
| # ESC and p. Heavily inspired by oh-my-zsh's sudo plugin. | |
| # | |
| # ------------------------------------------------------------------------------ | |
| # Authors | |
| # ------- |
Mapping of Toronto Neighbourhoods with TopoJSON and D3.js
| #!/bin/sh | |
| # | |
| # @author: Jabran Rafique <[email protected]> | |
| # @link: http://jabran.me/articles/automatic-database-backup-using-git-hosting/ | |
| # Set variables | |
| FULLDATE = $(date +"%Y-%d-%m %H:%M") | |
| NOW = $(date +"%Y-%m-%d-%H-%M") | |
| MYSQL_DUMP = `which mysqldump` | |
| GIT = `which git` |
| 'use strict'; | |
| var redis = require('redis'); | |
| var LaravelJob = require('./index'); | |
| // Create laravel job instance | |
| var job = new LaravelJob({}); | |
| // Set handlers on the job | |
| job.registerHandler("Jobinja\\Jobs\\ExampleJob", function(job, payload) { | |
| console.log(payload); |
| /** | |
| * Simple userland CPU profiler using v8-profiler | |
| * Usage: require('[path_to]/CpuProfiler').init('datadir') | |
| * | |
| * @module CpuProfiler | |
| * @type {exports} | |
| */ | |
| var fs = require('fs'); | |
| var profiler = require('v8-profiler'); |
Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.
new out put may look like
To have launchd start postgresql now and restart at login:
brew services start postgresql
Or, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/postgres start
| <?php | |
| // Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
| // http://youtu.be/dQw4w9WgXcQ | |
| // http://www.youtube.com/embed/dQw4w9WgXcQ | |
| // http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/v/dQw4w9WgXcQ | |
| // http://www.youtube.com/e/dQw4w9WgXcQ | |
| // http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
| #!/bin/bash | |
| # | |
| # This script will mount /Users in the boot2docker VM using NFS (instead of the | |
| # default vboxsf). It's probably not a good idea to run it while there are | |
| # Docker containers running in boot2docker. | |
| # | |
| # Usage: sudo ./boot2docker-use-nfs.sh | |
| # |