Skip to content

Instantly share code, notes, and snippets.

@husobee
husobee / png-lsb-steg.go
Created August 31, 2014 22:23
VERY simplified LSB stego example on PNGs (lossless)
// example of how to hide data in LSB of colors within a lossless png
package main
import (
"errors"
"flag"
"fmt"
"image"
"image/color"
"image/png"
@husobee
husobee / vigenere.go
Last active August 29, 2015 14:06
vigenere cipher in go
package main
import (
"flag"
"fmt"
)
// plaintext flag
var plaintext = flag.String("plaintext", "", "plaintext is the message you want to cipher")
@husobee
husobee / .vimrc
Last active December 25, 2021 00:40
my vimrc
" My .vimrc, it is pretty golang specific
colorscheme elflord
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=$GOROOT/misc/vim
" vundle plugins
@husobee
husobee / .tmux.conf
Created January 30, 2015 19:44
my tmux.conf for weemux
set-option -g status-utf8 on
set -g status-interval 1
set -g status-justify left # center align window list
set -g status-left-length 75
set -g status-right-length 150
set -g status-fg white
set -g status-bg black
set -g status-attr bright
@husobee
husobee / gist:9ff87a6f27e9abb4a3bc
Created March 3, 2015 20:33
Example of Mocking in Golang, and Monkey Patch
package main
import "fmt"
type Something struct {}
func (s Something) Test() bool {
return false
}
type SomethingInterface interface {
@husobee
husobee / wemux.conf
Created April 23, 2015 13:43
wemux.conf
host_list=(husobee)
host_groups=(wheel engineering)
default_client_mode="pair"
allow_server_change="true"
allow_server_list="true"
socket_prefix="/tmp/wemux"
@husobee
husobee / scanval.go
Last active December 16, 2022 18:44
scanner valuer example
package main
import (
"database/sql"
"database/sql/driver"
"errors"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
@husobee
husobee / coverage.html
Created November 17, 2015 14:03
go coverage external tests
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
background: black;
color: rgb(80, 80, 80);
}
body, pre, #legend span {
@husobee
husobee / main.go
Created December 9, 2015 13:15
bcrypt concurrency
package main
import (
"flag"
"fmt"
"time"
"golang.org/x/crypto/bcrypt"
)
@husobee
husobee / main.go
Created December 22, 2015 02:16
simple golang http middleware chaining example
package main
import (
"fmt"
"net/http"
"time"
"golang.org/x/net/context"
"github.com/husobee/backdrop"