# initialise new project package environment
npm init
PIPENV_VENV_IN_PROJECT=1 pipenv install
# install major version of package P (and dependencies)
npm i P@1
pipenv install --selective-upgrade "P<2"
const childProcess = require('child_process'); | |
const fs = require('fs'); | |
const yargs = require('yargs'); | |
function addScopeToLibraryProjectName({ name, scope }) { | |
runCommand('npx json -I -f angular.json ' | |
+ `-e "this.projects['${scope}-${name}'] = this.projects['${name}']"`); | |
runCommand(`npx json -I -f angular.json -e "delete this.projects['${name}']"`); | |
} |
function get_browser() { | |
var ua = navigator.userAgent, | |
tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; | |
if (/trident/i.test(M[1])) { | |
tem = /\brv[ :]+(\d+)/g.exec(ua) || []; | |
return { | |
name: 'IE', | |
version: (tem[1] || '') | |
}; | |
} |
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
- We define variables with
let
andconst
statements. For the purposes of the React documentation, you can consider them equivalent tovar
. - We use the
class
keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value ofthis
in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
How to configure your Mac to use DNS over TLS in five easy steps:
-
Install Stubby with Homebrew (https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Daemon+-+Stubby):
brew install stubby
-
Edit the configuration file:
function get_browser() { | |
var ua = navigator.userAgent, | |
tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; | |
if (/trident/i.test(M[1])) { | |
tem = /\brv[ :]+(\d+)/g.exec(ua) || []; | |
return { | |
name: 'IE', | |
version: (tem[1] || '') | |
}; | |
} |
This impliments a redis cluster backend for Flask-Cache as the standard redis cache cannot handle a redis cluster.
class Config(object):
// .stglobalignore | |
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc. | |
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment! | |
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced. | |
// Ignores are case sensitive. | |
// Put both .stignore and this .stglobalignore in the root of your sync folder(s) (where .stfolder resides) | |
$RECYCLE.BIN | |
$WINDOWS.~BT |
A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.
The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.