Skip to content

Instantly share code, notes, and snippets.

@husobee
husobee / png-lsb-steg.go
Created Aug 31, 2014
VERY simplified LSB stego example on PNGs (lossless)
View png-lsb-steg.go
// 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 Aug 29, 2015
vigenere cipher in go
View vigenere.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 Apr 6, 2018
my vimrc
View .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 Jan 30, 2015
my tmux.conf for weemux
View .tmux.conf
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 Mar 3, 2015
Example of Mocking in Golang, and Monkey Patch
View gist:9ff87a6f27e9abb4a3bc
package main
import "fmt"
type Something struct {}
func (s Something) Test() bool {
return false
}
type SomethingInterface interface {
View 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 Sep 23, 2020
scanner valuer example
View scanval.go
package main
import (
"database/sql"
"database/sql/driver"
"errors"
"fmt"
_ "github.com/mattn/go-sqlite3"
)
@husobee
husobee / coverage.html
Created Nov 17, 2015
go coverage external tests
View coverage.html
<!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 Dec 9, 2015
bcrypt concurrency
View main.go
package main
import (
"flag"
"fmt"
"time"
"golang.org/x/crypto/bcrypt"
)
@husobee
husobee / main.go
Created Dec 22, 2015
simple golang http middleware chaining example
View main.go
package main
import (
"fmt"
"net/http"
"time"
"golang.org/x/net/context"
"github.com/husobee/backdrop"