- On Windows:
Gitter -> Developer Tools
Paste this into the console, change the zoomLevel
to the desired value.
var desktopWindow = gui.Window.get();
desktopWindow.zoomLevel = 0;
[master] ~/go/src/github.com/agrison/golang-mux-benchmark$ go test -bench=. 2>/dev/null | |
PASS | |
BenchmarkGocraftWeb_Simple 2000000 926 ns/op | |
BenchmarkGocraftWeb_Route15 1000000 2203 ns/op | |
BenchmarkGocraftWeb_Route75 1000000 2204 ns/op | |
BenchmarkGocraftWeb_Route150 1000000 2232 ns/op | |
BenchmarkGocraftWeb_Route300 1000000 2255 ns/op | |
BenchmarkGocraftWeb_Route3000 1000000 2481 ns/op | |
BenchmarkGocraftWeb_Middleware 1000000 1539 ns/op | |
BenchmarkGocraftWeb_Composite 500000 3518 ns/op |
Gitter -> Developer Tools
Paste this into the console, change the zoomLevel
to the desired value.
var desktopWindow = gui.Window.get();
desktopWindow.zoomLevel = 0;
Upgrade Django from 1.1 to 1.5.1. This highlights some of the issues that one may encounter when updating Django. It's not possible to cover every case, but this should provide a good general starting point.
Django now supports multiple databases and changes are needed to how the database connections are defined.
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: minimal | |
description: News Articles ftw | |
paths: | |
/users: | |
get: | |
responses: | |
"200": |
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// result of this is more like tumblr version than twitter version (https://necessary-disorder.tumblr.com/image/190425356073) | |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} |
intranet.example.com { | |
@ipfilter { | |
not remote_ip 192.168.0.0/16 | |
} | |
route @ipfilter { | |
# redirect | |
redir https://example.com/ | |
# or respond | |
# respond "Access denied" 403 { | |
# close |
package log | |
import ( | |
"fmt" | |
"github.com/Sirupsen/logrus" | |
"runtime" | |
"strings" | |
) | |
var logger = logrus.New() |
A slightly updated version of this doc is here on my website.
I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.
The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x)
, where f()
is a function.
Here is the raw output from examining the Python LambdaContext context object in a AWS Lambda function when called from a CloudFormation stack. More information on the context object can be found here : http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
<__main__.LambdaContext object at 0x7fd706780710>
[Unit] | |
Description=Metabase server | |
After=syslog.target | |
After=network.target | |
[Service] | |
WorkingDirectory=/home/data/tools/metabase | |
ExecStart=/usr/bin/java -jar /home/data/tools/metabase/metabase.jar | |
Environment=MB_JETTY_PORT=8080 | |
User=data |