- https://npmjs.com/bel – create DOM elements
- https://npmjs.com/nanomorph – DOM diffing to update elements
- https://npmjs.com/nanocomponent – lifecycle events for elements
#!/bin/bash | |
SERVER=yourwebsite.com | |
tar -cjf- ~/.crypt/passwd ~/.ssh ~/.bashrc ~/.profile ~/.vimrc ~/.gitconfig \ | |
~/.config/chromium ~/.mozilla \ | |
| openssl enc -aes-256-cbc \ | |
| ssh $SERVER 'cat>~/www/backup/`date +%F.%T`' | |
ssh $SERVER 'ls -1 ~/www/backup | grep ^[0-9] | sort > ~/www/backup/list.txt' |
// the two testing modules I like | |
var test = require('tape') | |
var spawn = require('tape-spawn') | |
var execspawn = require('npm-execspawn') // can spawn from require() scope, check it out! | |
// put this in outer scope so we can kill the local server at the end | |
var server | |
test('start test server', function (t) { |
-- get pid for db | |
SELECT state, client_addr, pid FROM pg_stat_activity where datname = 'afgo_qa'; | |
-- kill pid for db | |
SELECT pg_terminate_backend(12193); |
license: bsd-3-clause |
/** | |
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found | |
* in the Firebase console under project settings then 'Web API Key'. | |
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from | |
* your Firebase app, look for the formdata values | |
* | |
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the | |
* global 'refresh_token'. | |
* | |
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}' |
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |
There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:
info_format
parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.The difference between XYZ and TMS tiles and how to convert between them
Lots of tile-based maps use either the XYZ or TMS scheme. These are the maps that have tiles
ending in /0/0/0.png
or something. Sometimes if it's a script, it'll look like
&z=0&y=0&x=0
instead. Anyway, these are usually maps in Spherical Mercator.
Good examples are OpenStreetMap, Google Maps, MapBox, MapQuest, etc. Lots of maps.
Most of those are in XYZ. The best documentation for that is slippy map tilenames on the OSM Wiki, and Klokan's Tiles a la Google.
Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.
My 3 developers team has just developed React.js application with 7668
lines of CSS (and just 2 !important
).
During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.
Here are main principles we use to write CSS for modern (IE11+) browsers: