db.coll.find().forEach(doc => {})
db.coll.find().forEach(doc => { // ... change doc
// update
version: '3.3' | |
services: | |
reverse-proxy: | |
image: traefik:v1.7 | |
ports: | |
- target: 80 | |
published: 80 | |
mode: host | |
- target: 8080 | |
published: 8080 |
# install docker-ce on ubuntu | |
sudo apt-get update && \ | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common && \ | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ |
version: '2' | |
services: | |
jenkins: | |
image: jenkinsci/blueocean | |
user: root | |
restart: always | |
volumes: | |
- jenkins-data:/var/jenkins_home | |
- /var/run/docker.sock:/var/run/docker.sock | |
- $HOME/jenkins:/home |
sed -i '' \ | |
-e 's/that\.data/that/' \ | |
-e 's/this\.data/this/' \ | |
-e 's/that\.setData(/Object.assign(that.$data, /' \ | |
-e 's/this\.setData(/Object.assign(this.$data, /' \ | |
-e 's!//\([^ ]\)!// \1!' \ | |
-e 's/function(/function (/' \ | |
-e 's/^\( *\)\([^ (.]\{1,\}\)(/\1\2 (/' \ | |
-e 's/ == / === /' \ | |
-e 's/ *;? *$//' \ |
-- see https://github.com/ankidroid/Anki-Android/wiki/Database-Structure for a more maintained version of this | |
-- cards are what you review. easy! | |
CREATE TABLE cards ( | |
id integer primary key, | |
-- the epoch milliseconds of when the card was created | |
nid integer not null, | |
-- notes.id | |
did integer not null, | |
-- deck id (available in col table) |
// https://github.com/nuxt/example-auth0/blob/master/utils/auth.js | |
const getQueryParams = () => { | |
const params = {} | |
window.location.href.replace(/([^(?|#)=&]+)(=([^&]*))?/g, ($0, $1, $2, $3) => { | |
params[$1] = $3 | |
}) | |
return params | |
} |
{ | |
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "scope": "javascript,typescript", |
{ | |
// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
function * fab (max) { | |
let [n, a, b] = [0, 0, 1] | |
while (n++ < max) { | |
[a, b] = [b, a + b] | |
yield b | |
} | |
} | |
for (let n of fab(5)) { | |
console.log(n) |