Note: this rough draft has turned into https://github.com/maxogden/art-of-node#art-of-node
go to https://github.com/maxogden/art-of-node#art-of-node to view the newer versions of this document
go to https://github.com/maxogden/art-of-node#art-of-node to view the newer versions of this document
1. Create an etcd token; store it in Vault or some other secure location | |
2. Create file /etc/systemd/system/docker.service.d/custom.conf with contents: | |
[Service] | |
Environment="DOCKER_OPTS=-H=0.0.0.0:2376 -H unix:///var/run/docker.sock --cluster-advertise eth1:2376 --cluster-store etcd://127.0.0.1:2379" | |
This needs to be done in cloud-init since CoreOS is super bare-bones and "doesn't" contain support for config mgmt out of the box. |
Addressing feedback from this Gist.
Pagination. Looks like limited to paginate by id. I wanted to paginate by a date field and felt impossible
In the most recent Preview version, (cursor-)pagination can be done by any unique field or combination of fields. For example:
model Post {
id Int @id @default(autoincrement())
title String
var AUTH_URL = "https://api.glitch.com/oauth2/authorize?response_type=code&client_id=000yourclientid000&redirect_uri=http://yoursitehere/oauth/&scope=identity"; | |
var Auth_Router = Backbone.Router.extend({ | |
routes: { | |
"": "root", | |
"oauth/?code=:code": "auth" | |
}, | |
root: function () {}, | |
auth: function (code) { | |
Meteor.call('authenticate', code, function (error, result) { |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
namespace: default | |
name: pv-default-100g-disk01 | |
annotations: | |
volume.beta.kubernetes.io/storage-class: default | |
spec: | |
accessModes: | |
- ReadWriteOnce |
#!/bin/bash | |
# Cloud-config for CoreOS IPXE deployment on Vultr | |
################################################## | |
# This cloud-config bootstraps CoreOS on /dev/vda and provisions: | |
# - private ip-address on eth1 | |
# - etcd on private network | |
# - fleet on private network | |
# - basic firewall (docker compatible) | |
# - SSHd security hardening | |
################################################## |
const http = require('http') | |
const rpc = require('./rpc') | |
/** | |
* Pets service. | |
*/ | |
class Pets { | |
constructor(db = []) { |
APITOKEN="" # TODO: add your token here (create one: https://github.com/settings/tokens) | |
# be sure to check if the token hasn't expired! | |
# for ORG and TEAM, you can get those by navigating to your team on github | |
# and seeing the url, which will be in the format: | |
# https://github.com/orgs/{ORG}/teams/{TEAM}/discussions | |
# e.g. https://github.com/orgs/application-research/teams/a-team/discussions |
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example: