Using d3.geo.tile to display vector tiles using canvas, with d3.behavior.zoom for pan & zoom. This example provides additional mechanism for caching tile data, and different road styles dependend on types from json tiles.
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
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough banksean@gmail.com | |
// | |
// require.js wrap by Szymon Kaliski contact@treesmovethemost.com | |
define([], function() { | |
/** |
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
require('../src/app'); | |
var chokidar = require('chokidar'); | |
var ignore = [ 'node_modules', 'backend' ]; // directories to ignore | |
var watcher = chokidar.watch('./src/*/'); | |
var reloadCache = function(path) { | |
Object.keys(global.require.cache) | |
.filter(function(key) { | |
return ignore.every(function(value) { |
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
(def google-get-cache (atom (cache/ttl-cache-factory {} :ttl (* 1000 60 60 1)))) | |
(defn google-get [access-token path] | |
(-> (client/get (str "https://www.googleapis.com/calendar/v3/" path) | |
{:query-params {:access_token access-token} | |
:accept :json}) | |
:body | |
(json/read-str :key-fn #(-> % ->kebab-case keyword)))) | |
(defn google-get-cached [access-token path] |
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
// ==UserScript== | |
// @name BZWBK Currency Converter | |
// @version 0.1 | |
// @description computes currency in BZWBK online panel to display everything in PLN | |
// @author You | |
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser-polyfill.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/money.js/0.2.0/money.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/accounting.js/0.4.1/accounting.min.js |
I hereby claim:
- I am szymonkaliski on github.
- I am szymonkaliski (https://keybase.io/szymonkaliski) on keybase.
- I have a public key ASD2G2YJgkYAlDxtlFjz9ObDKeTCi4pT9lO0fnhU9iPB-wo
To claim this, I am signing this object:
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
/* | |
ABOUT: | |
A fast single file 2D voronoi diagram generator. | |
HISTORY: | |
0.2 2016-12-30 - Fixed issue of edges not being closed properly | |
- Fixed issue when having many events |
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
const L = require('leaflet'); | |
const csv = require('comma-separated-values'); | |
const fs = require('fs'); | |
const fileData = fs.readFileSync('quakes.csv').toString(); | |
const csvData = csv.parse(fileData); | |
const linkEl = document.createElement('link'); | |
linkEl.rel = 'stylesheet'; | |
linkEl.href = 'file:///' + __dirname + '/node_modules/leaflet/dist/leaflet.css'; |
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
set nosmoothscroll | |
let hintcharacters = "asdfewjklio" | |
let scrollduration = 0 | |
unamp e | |
unmap "shift+d" | |
unmap "shift+e" | |
unmap "shift+g" | |
unamp 0 | |
unmap $ |
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
@-webkit-keyframes fadein { | |
from { | |
opacity: 0; | |
} | |
to { | |
opacity: 1; | |
} | |
} | |
#sVim-command { |
OlderNewer