- https://npmjs.com/bel – create DOM elements
- https://npmjs.com/nanomorph – DOM diffing to update elements
- https://npmjs.com/nanocomponent – lifecycle events for elements
/** | |
* 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}}' |
license: bsd-3-clause |
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:
Bash is the JavaScript of systems programming. Although in some cases it's better to use a systems language like C or Go, Bash is an ideal systems language for smaller POSIX-oriented or command line tasks. Here's three quick reasons why:
This document is how I write Bash and how I'd like collaborators to write Bash with me in my open source projects. It's based on a lot of experience and time collecting best practices. Most of them come from these two articles, but here integrated, slightly modified, and focusing on the most bang for buck items. Plus some ne
// 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) { |
#!/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' |
-- 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); |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
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.