Skip to content

Instantly share code, notes, and snippets.

Avatar

Evan J Johnson ejcx

View GitHub Profile
@ejcx
ejcx / flight.go
Created Mar 23, 2019
Flight Server
View flight.go
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
)
View tmux.conf
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
View gist:0c73a8ad6de520ce81ecd296c6dda340
addEventListener('fetch', event => {
event.respondWith(fetch('https://slot1.mysite.com'))
})
View jwtex_test.go
package jwtex
import (
"encoding/base64"
"encoding/json"
"fmt"
"strings"
"testing"
)
View gist:0083688d3772009bb10feb5acd7c663a
### 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:
View wf.sh
#!/bin/zsh
wf() {
curl -s "https://www.wolframalpha.com/input/autocomplete.jsp?i=$@" | \
jq '.instantMath' | \
jq 'select(.approximateResult != null).approximateResult, select(.exactResult != null).exactResult'
}
View fmt.vim
" 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
"
View .vimrc
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 Aug 11, 2016
Basic configuration for a global HTTP proxy.
View nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
View openrestyinstall.sh
brew install homebrew/nginx/openresty
You can’t perform that action at this time.