This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update; \ | |
apt-get install -y curl; \ | |
apt-get install -y apt-transport-https; \ | |
(curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -); \ | |
(echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list); \ | |
apt-get update; \ | |
(curl -sL https://deb.nodesource.com/setup_9.x | bash -); \ | |
apt-get install -y nodejs; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebpackBar = require('webpackbar') | |
const withPlugins = require('next-compose-plugins') | |
const withBundleAnalyzer = require('@next/bundle-analyzer')({ | |
enabled: process.env.ANALYZE === 'true' | |
}) | |
const withMDX = require('@next/mdx')({ | |
extension: /\.mdx?$/, | |
use: ['babel-loader', '@mdx-js/loader'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebpackBar = require('webpackbar') | |
module.exports = { | |
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { | |
// Note: we provide webpack above so you should not `require` it | |
// Perform customizations to webpack config | |
config.plugins.push(new WebpackBar({ | |
name: 'Bundle' | |
})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{.push raises: [].} | |
import pkg/chronos | |
type | |
MyError = object of CatchableError | |
Handle1 = Future[void].Raising([CancelledError]) | |
Handle2 = Future[void].Raising([CancelledError, MyError]) | |
SomeType = object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/sequtils | |
import std/macros | |
import pkg/chronos | |
from pkg/chronos/internal/raisesfutures import makeNoRaises | |
macro newRaisingFuture(T: typedesc, E: typed, fromProc: static[string] = ""): untyped = | |
let | |
baseType = T.strVal | |
e = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools as it | |
import os | |
import json | |
from hashlib import sha1 | |
def to_hex(b): | |
return [block.hex() for block in b] | |
def encode(obj): | |
""" |
OlderNewer