Skip to content

Instantly share code, notes, and snippets.

View ejcx's full-sized avatar

Evan J Johnson ejcx

View GitHub Profile
@ejcx
ejcx / flight.go
Created March 23, 2019 05:01
Flight Server
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
)
@ejcx
ejcx / tmux.conf
Created March 2, 2019 23:15
tmux
set -g default-terminal "xterm-256color"
setw -g xterm-keys on
setw -g mode-keys vi
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
addEventListener('fetch', event => {
event.respondWith(fetch('https://slot1.mysite.com'))
})
package jwtex
import (
"encoding/base64"
"encoding/json"
"fmt"
"strings"
"testing"
)
### Keybase proof
I hereby claim:
* I am ejcx on github.
* I am twitter (https://keybase.io/twitter) on keybase.
* I have a public key whose fingerprint is D715 1D01 C032 5376 A36E D4D2 6A2A C268 A23B 940F
To claim this, I am signing this object:
@ejcx
ejcx / wf.sh
Last active May 13, 2017 20:09
#!/bin/zsh
wf() {
curl -s "https://www.wolframalpha.com/input/autocomplete.jsp?i=$@" | \
jq '.instantMath' | \
jq 'select(.approximateResult != null).approximateResult, select(.exactResult != null).exactResult'
}
" Copyright 2011 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" fmt.vim: Vim command to format Go files with gofmt.
"
" This filetype plugin add a new commands for go buffers:
"
" :Fmt
"
call pathogen#infect('/Users/ejcx/.vim/bundle/{}')
fu! Kernelstyle()
set sw=8
set ts=8
set noexpandtab
endf
fu! Normalstyle()
syntax on
set tabstop=2
set shiftwidth=2
@ejcx
ejcx / nginx.conf
Last active December 9, 2022 21:07
Basic configuration for a global HTTP proxy.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
brew install homebrew/nginx/openresty