I hereby claim:
- I am kmaschta on github.
- I am kmaschta (https://keybase.io/kmaschta) on keybase.
- I have a public key ASCZaN5SJpgXVcd7XuqosiSCH_kN_xMilDHnwFZ4isGu6wo
To claim this, I am signing this object:
type Options = { | |
maxRetries?: number; // Maximum amount of retries before raising the error (default: 3) | |
silent?: boolean; // Minimize the error as warning when retrying the function (default: true) | |
wait?: number; // Wait time before each retry in milliseconds (default: 500ms) | |
exponentialBackoff?: boolean; // Wait longer every time we retry (default: false) | |
randomize?: boolean; // Wait a random amount of time before retrying, maximum double of the given time (default: null) | |
}; | |
const waitMs = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); | |
const getRandomInt = (max: number) => Math.floor(Math.random() * max); |
I hereby claim:
To claim this, I am signing this object:
// https://www.journee-mondiale.com/les-journees-mondiales.htm | |
(() => { | |
const links = {}; | |
const articles = document.querySelectorAll('article'); | |
articles.forEach((article, monthIndex) => { | |
const items = article.querySelectorAll('li'); | |
items.forEach((li) => { |
If you're using self-signed certificate for your web server on development, you might know the browser warning saying that your certificate isn't valid. If like me you had manually added an exception for this certificate error each time it showed up, this gist is for you.
You'll have to create a self-signed certificate with a custom SubjectAltName.
find /usr/lib -name openssl.cnf
### Keybase proof | |
I hereby claim: | |
* I am kmaschta on github. | |
* I am kmaschta (https://keybase.io/kmaschta) on keybase. | |
* I have a public key ASAvkWIvIk1a3VcepH9b0Rl9_wd2ECc7UaHwaUDbLtBuIwo | |
To claim this, I am signing this object: |
require('isomorphic-fetch'); | |
const express = require('express'); | |
const { makeExecutableSchema } = require('graphql-tools'); | |
const graphqlHTTP = require('express-graphql'); | |
const books = [ | |
{ title: "Harry Potter and the Sorcerer's stone", author: "J.K. Rowling" }, | |
{ title: "Jurassic Park", author: "Michael Crichton" }, | |
]; |
const express = require('express'); | |
const winston = require('winston'); | |
const expressWinston = require('./express-winston'); | |
const app = express(); | |
const consoleFormatter = ({ level, meta: { req, res, responseTime, stack } }) => { | |
let msg = `${winston.config.colorize(level, level)} HTTP ${req.method} ${req.url}`; | |
if (res) { |
.PHONY: build | |
TAG ?= | |
SERVER ?= staging-server | |
install: | |
npm install | |
start: | |
node --require reify server.js |
// Warn from unhandled promise rejection that can occurs without failing tests | |
// jest --setupFiles setup-tests.js | |
process.on('unhandledRejection', (error, promise) => { | |
console.error('Unhandled Rejection at:', promise, `\n${error.stack}`); | |
}); |
#!/usr/bin/python | |
help = """Retrieve all the stats from WakaTime API | |
Usage: | |
wakatime_stats.py <token> | |
Options: | |
-h --help Show this very help message | |
See https://wakatime.com/developers |