Skip to content

Instantly share code, notes, and snippets.

View pkieltyka's full-sized avatar
🇨🇦
hi

Peter Kieltyka pkieltyka

🇨🇦
hi
View GitHub Profile
{
"keyboard": "kbdfans/kbd75/rev1",
"keymap": "pkkb",
"layout": "LAYOUT_ansi",
"layers": [
[
"KC_ESC",
"KC__MUTE",
"KC__VOLDOWN",
"KC__VOLUP",
##
## HTTP Router benchmarks -- August 31st, 2017 running Go 1.9.0
##
## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark
## using the most up-to-date version of each pkg as of today. Each router has their own
## pros and cons, so consider the designs of each router to suit your application.
##
[peter@pak ~/Dev/go/src/github.com/pkieltyka/go-http-routing-benchmark]$ go test -v -bench="Chi" .
const path = require('path')
const fs = require('fs')
const contractBuildDir = path.join(path.dirname(require.main.filename), '../build/contracts')
const abiDir = path.join(path.dirname(require.main.filename), '../abi')
fs.readdir(contractBuildDir, (err, files) => {
if (err) {
console.error('whoops', err)
process.exit()
theme = "solarized-dark"
[icons]
name = "awesome"
[icons.overrides]
#backlight_empty = " \\u{1f311} "
#backlight_partial1 = " \\u{1f312} "
#backlight_partial2 = " \\u{1f313} "
#backlight_partial3 = " \\u{1f314} "
'use strict';
import { Provider } from './provider';
import { EtherscanProvider } from './etherscan-provider';
import { FallbackProvider } from './fallback-provider';
import { IpcProvider } from './ipc-provider';
import { InfuraProvider } from './infura-provider';
import { JsonRpcProvider, JsonRpcSigner } from './json-rpc-provider';
import { Web3Provider } from './web3-provider';
// bare-bones chi hello world
package main
import (
"net/http"
"github.com/pressly/chi"
)
func main() {
##
## HTTP Router benchmarks -- Jan 7th, 2017 running Go 1.8beta2
##
## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark
## using the most up-to-date version of each pkg as of today. Each router has their own
## pros and cons, so consider the designs of each router to suit your application.
##
[peter@pak ~/Dev/go/src/github.com/pkieltyka/go-http-routing-benchmark]$ go test -v -bench="Chi" .
#GithubAPI Routes: 203
@pkieltyka
pkieltyka / acl_mux.go
Created January 4, 2017 21:59
Example of acl mux on top of chi router
package acl
import (
"net/http"
"reflect"
"regexp"
"runtime"
"strings"
"github.com/pressly/chi"
@pkieltyka
pkieltyka / gist:76a59d33492dd2732e691ad8c0b274a4
Last active January 3, 2017 22:25
github.com/pressly/chi v2 benchmark suite - using latest versions of each project as of Aug 1, 2016
$ go test -v -bench="Chi|HttpRouter|Goji|Martini|Gorilla|Gocraft|Beego|Gin" .
#GithubAPI Routes: 203
Beego: 165304 Bytes
Chi: 74056 Bytes
Gin: 52464 Bytes
GocraftWeb: 95720 Bytes
Goji: 86088 Bytes
GorillaMux: 1494864 Bytes
HttpRouter: 37464 Bytes
Martini: 556160 Bytes
package middleware
import (
"io/ioutil"
"net/http"
"net/http/httptest"
"sync"
"testing"
"github.com/pressly/chi"