Create an external Ceph Cluster for all your Kubernetes clusters.
INSTALL CEPHADM
- Prerequisites:
- 3 VMs, with unused disks
- Python 3, Cephadm is a Python-based utility
| trap 'echo "got sigterm" ; exit 0' SIGTERM | |
| EXPIRATION_SECONDS=${EXPIRATION_SECONDS:-900} | |
| PGW_URL=${PGW_URL:-http://pushgateway} | |
| function convert_to_standardnotation(){ | |
| # convert number from scientific notation to standar d( ie '1.5383780136826127e+09' ) | |
| printf '%.0f' $1 | |
| } |
| /** | |
| * Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
| * It was requested to be introduced at as part of the jsonwebtoken library, | |
| * since we feel it does not add too much value but it will add code to mantain | |
| * we won't include it. | |
| * | |
| * I create this gist just to help those who want to auto-refresh JWTs. | |
| */ | |
| const jwt = require('jsonwebtoken'); |
| # This has been edited to work with python3. Some of the tested combinations will not work in python2. | |
| import pandas as pd | |
| df = pd.DataFrame({'text': [str(i % 1000) for i in range(1000000)], | |
| 'numbers': range(1000000)}) | |
| import pickle | |
| # Python 3 has no cPickle | |
| #import cPickle | |
| import json | |
| from functools import partial |
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.
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.