Skip to content

Instantly share code, notes, and snippets.

Evan J Johnson ejcx

Block or report user

Report or block ejcx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .tmux.conf
set -g default-terminal "xterm-256color"
setw -g xterm-keys on
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind h select-pane -L
bind j select-pane -D
View gist:1ff9848b2f8fc42f21c3
package main
import (
"fmt"
"os"
"encoding/json"
)
type Foobar struct {
A_int int
View gist:608ddb86e40a2ef7809c
### Keybase proof
I hereby claim:
* I am steakejjs on github.
* I am ej (https://keybase.io/ej) on keybase.
* I have a public key whose fingerprint is 9AA6 07A3 AD1D 45DA BDE3 3CEE 82A5 93BA A90B E68C
To claim this, I am signing this object:
@ejcx
ejcx / gist:6c17f07c4ca72115bfec
Created Apr 15, 2015
Gorilla Session Decode
View gist:6c17f07c4ca72115bfec
~ echo "MTQyODg2MTkwOHxEdi1CQkFFQ180SUFBUkFCRUFBQU1QLUNBQUlHYzNSeWFXNW5EQVVBQTJadmJ3WnpkSEpwYm1jTUJRQURZbUZ5QTJsdWRBUUNBRlFEYVc1MEJBSUFWZz09fGZWZuwf1oFeGx0R7d7EzCqJix5E-N4AGeXlMXNb0Uju" | base64 -D
1428861908|Dv-BBAEC_4IAARABEAAAMP-CAAIGc3RyaW5nDAUAA2ZvbwZzdHJpbmcMBQADYmFyA2ludAQCAFQDaW50BAIAVg==|fVf�ց^����*��D����1s[�H�%
➜ ~ echo "Dv-BBAEC_4IAARABEAAAMP-CAAIGc3RyaW5nDAUAA2ZvbwZzdHJpbmcMBQADYmFyA2ludAQCAFQDaW50BAIAVg==" | base64 -D
����0��stringfoostringbarintTintV%
View gist:e5a1b42be01d0dd5f3e3
### Keybase proof
I hereby claim:
* I am ejcx on github.
* I am ej (https://keybase.io/ej) on keybase.
* I have a public key whose fingerprint is 9AA6 07A3 AD1D 45DA BDE3 3CEE 82A5 93BA A90B E68C
To claim this, I am signing this object:
@ejcx
ejcx / bigfavicon.go
Last active Aug 29, 2015
PoC to make browsers download favicons that are way bigger than should be allowed.
View bigfavicon.go
package main
import (
"crypto/rand"
"fmt"
"log"
"net/http"
"os"
)
View newbox.sh
#!/bin/bash
cd
echo "export PATH=\"/usr/local/go/bin/\":\$PATH
export GOPATH=\"/root/go\"" >> ~/.bashrc
curl https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz > go.1.4.2.tar.gz
tar -zxvf go.1.4.2.tar.gz
mv go /usr/local/
mkdir go
cd go
mkdir src bin pkg
View gist:ddbc91088243c96718da
package main
import (
"crypto/rand"
"fmt"
"log"
"net/http"
"os"
)
View badexec.go
package main
import (
"os/exec"
"fmt"
)
func main() {
err := exec.Command("man", "-P /tmp/runme.sh", "man").Run()
fmt.Println(err)
@ejcx
ejcx / goodAuthPattern.go
Last active Jan 2, 2016
Go Authentication Design Patterns
View goodAuthPattern.go
package main
import (
"log"
"net/http"
"os"
"github.com/gorilla/sessions"
)
You can’t perform that action at this time.