Min max slider example
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 multiCrowbar = (function() { | |
| /* | |
| * SVG Export | |
| * converts html labels to svg text nodes | |
| * will produce incorrect results when used with multi-line html texts | |
| * | |
| * Author: Gregor Aisch | |
| * based on https://github.com/NYTimes/svg-crowbar/blob/gh-pages/svg-crowbar-2.js | |
| */ |
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') | |
| , jwtMiddleware = require('express-jwt') | |
| , bodyParser = require('body-parser') | |
| , cookieParser = require('cookie-parser') | |
| , cors = require('cors'); | |
| // We pass a secret token into the NodeJS process via an environment variable. | |
| // We will use this token to sign cookies and JWTs | |
| var SECRET_TOKEN = process.env.SECRET_TOKEN; |
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
| #!/bin/sh | |
| # Set the AWS environment variables for an AWS profile | |
| # Useful for docker-machine | |
| # | |
| # Example: | |
| # | |
| # aws_env profile-for-testing | |
| # | |
| # Further information: | |
| # See the AWS CLI `aws configure` |
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
| height: 960 | |
| border: no |
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
| #!/bin/bash | |
| sudo add-apt-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git -y |
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
| # for nvm | |
| export NVM_DIR="$HOME/.nvm" | |
| . "$(brew --prefix nvm)/nvm.sh" | |
| load-nvmrc() { | |
| if [[ -f .nvmrc && -r .nvmrc ]]; then | |
| nvm use | |
| elif [[ $(nvm version) != $(nvm version default) ]]; then | |
| echo "Reverting to nvm default version" | |
| nvm use default |
This is a ServiceWorker template to turn small github pages into offline ready app.
Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.
Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.
| Zoom | Tile size at equator (km) | Resolution at equator (m) |
|---|---|---|
| 0 | 22568 | 88155 |
| 1 | 11284 | 44078 |
| 2 | 7656 | 29904 |
| 3 | 4577 | 17881 |
| 4 | 2443 | 9544 |
| 5 | 1244 | 4861 |
| 6 | 625 | 2442 |
| 7 | 313 | 1223 |