Skip to content

Instantly share code, notes, and snippets.

View errnoh's full-sized avatar

Erno Hopearuoho errnoh

View GitHub Profile
@errnoh
errnoh / README.md
Created May 29, 2017 13:40
Examples of Docker two-step builds with credentials

Two-step build examples

Examples how to build Docker images with private repository dependencies without adding credentials inside the resulting image.

Just letting you know that it's me.
23092016

Keybase proof

I hereby claim:

  • I am errnoh on github.
  • I am errnoh (https://keybase.io/errnoh) on keybase.
  • I have a public key ASCvKY-cX9UbwBywI6r0DOybWMdRF2mEKAtmoob_2ag1AQo

To claim this, I am signing this object:

# 256 Color palette: http://upload.wikimedia.org/wikipedia/commons/9/95/Xterm_color_chart.png
# Powerline fonts: https://github.com/Lokaltog/powerline-fonts | codepoints: https://powerline.readthedocs.org/en/latest/fontpatching.html |       
# Make it use C-a, similar to screen..
set-option -g prefix C-a
unbind C-b
bind-key C-a last-window
# Bind vertically with | and horizontally with -
unbind %
@errnoh
errnoh / honbotguide.md
Last active December 17, 2015 01:19
HoN bot creation guide (Mostly for tkt-hon course)

HoN bot creation guide:

  1. Unzip relevant .lua files:

Inside HoN/game/

unzip resources0.s2z "bots/behaviorlib.lua"
package main
import (
"encoding/json"
"net/http"
"runtime"
"strconv"
)
type MessageStruct struct {
@errnoh
errnoh / reverse.go
Created October 14, 2012 00:37
reverse testing
package reverse
type intslice []int
func (slice intslice) swap(i, j int) {
slice[i], slice[j] = slice[j], slice[i]
}
func (slice intslice) len() int {
return len(slice)
package main
func appendlast(s []int, v int) []int {
return append(s, v)
}
func appendfirst(s []int, v int) []int {
return append([]int{v}, s...)
}
@errnoh
errnoh / tile.rc
Created May 9, 2012 19:14 — forked from vrthra/tile.rc
tiling script for rio
#!/bin/rc
# get the position from the image input
fn winpos {
dd -bs 1 -skip 20 -count 40 -quiet 1
}
# get just width and height
fn winsize {
winpos | awk '{print ($3-$1),($4-$2)}'
}
@errnoh
errnoh / output
Created May 7, 2012 22:12 — forked from awreece/output
go test -bench=.
testing: warning: no tests to run
PASS
BenchmarkConcat 50000 35181 ns/op
BenchmarkPlusConcat 500000 4998 ns/op
BenchmarkJoin 200000 7727 ns/op
BenchmarkBuffer 200000 8456 ns/op
BenchmarkByteWrite 500000 5225 ns/op
ok self/dotnames 10.739s