Skip to content

Instantly share code, notes, and snippets.

View haykerman's full-sized avatar
🎯
Focusing

Hayk Baghdasaryan haykerman

🎯
Focusing
  • Tidepool Labs Europe
  • Yerevan, Armenia
View GitHub Profile
@haykerman
haykerman / http2.js
Created April 16, 2019 14:20 — forked from davidgilbertson/http2.js
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};
@haykerman
haykerman / index.html
Last active July 11, 2019 09:10
Redux
<div id="root" />
@haykerman
haykerman / .eslintrc.js
Created November 18, 2019 23:35
A config file for ESLint.
module.exports = {
env: {
browser: true,
es6: true,
},
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/react'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
@haykerman
haykerman / .prettierrc.js
Last active November 18, 2019 23:48
A config file for Prettier.
module.exports = {
singleQuote: true,
trailingComma: 'all',
};