Skip to content

Instantly share code, notes, and snippets.

/* (1) Invert colors, reduce contrast */
html:not(.nodarken):not(.darkeni) {
filter: invert(100%) hue-rotate(180deg) brightness(75%) contrast(90%) !important;
background-image: none !important;
background-color: #000 !important;
}
/* (2) Invert colors */
html:not(.nodarken).darkeni {
filter: invert(100%) hue-rotate(180deg) brightness(50%) contrast(50%) !important;
@mrrovot
mrrovot / i18n-express-hbs-app.js
Created October 4, 2018 00:11 — forked from mashpie/i18n-express-hbs-app.js
express + i18n-node + handlebars and avoid concurrency issues
// require modules
var express = require('express'),
i18n = require('i18n'),
hbs = require('hbs'),
app = module.exports = express();
i18n.configure({
locales: ['en', 'fr'],
cookie: 'locale',
directory: "" + __dirname + "/locales"
@mrrovot
mrrovot / ListenToEventsWeb3-1-0-0-beta.js
Created August 21, 2018 18:50 — forked from sogoiii/ListenToEventsWeb3-1-0-0-beta.js
Listening to Solidity events using web3 1.0.0 beta
const Web3 = require('web3') // Works with web3 1.0.0-beta27
const contractArtifact = require('./build/contracts/TutorialToken.json')
const web3 = new Web3()
const providerUrl = 'ws://localhost:8545' // requires # https://github.com/trufflesuite/ganache-cli/releases/tag/v7.0.0-beta.0 or https://github.com/trufflesuite/ganache/releases/tag/v1.1.0-beta.0
const provider = new Web3.providers.WebsocketProvider(providerUrl)
web3.setProvider(provider)
web3.eth.net.getId()
.then(networkId => {