git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
Usage:
var player = new Rect(0, 0, 100, 100);
var target = new Rect(50, 50, 100, 100);
player.is = new AABB(player);
player.is.inside(target);
player.is.colliding(target);
player.is.containing(target);
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test 2 way data binding</title> | |
</head> | |
<body> | |
<div id="app">{{ abc }} - {{ def }} = {{ abc-def }} </div> | |
<button id='add'>add</button> | |
<button id='double'>double</button> | |
<script src='main.js'></script> |
There are many methods for writing Vault policies. | |
This gist was created to collect the most common methods | |
such that they can be easily used as references for syntax, | |
as well as evaluation for which method suits a particular purpose. | |
TODO: | |
- Add complex policy examples | |
- Add @json.file examples |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays