Skip to content

Instantly share code, notes, and snippets.

Will Mernagh wm

Block or report user

Report or block wm

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_bindings.md
Key binding Action
M n next-window
M p previous-window
M j move down a pane
M k move up a pane
M h move left a pane
M-l move right a pane
M ↑ move the pane divide up (resize)
M ↓ move the pane divide down (resize)
@wm
wm / main.go
Created Nov 8, 2015
calling-vs-casting-4
View main.go
package main
import (
"fmt"
"net/http"
)
func Rofl(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "ROFL")
}
@wm
wm / main.go
Created Nov 8, 2015
calling-vs-casting-3
View main.go
package main
import (
"fmt"
"net/http"
)
func Yolo(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "YOLO")
}
@wm
wm / main.go
Created Nov 8, 2015
casting-vs-calling-2
View main.go
package main
import (
"fmt"
"net/http"
)
type Lol struct{}
func (l *Lol) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@wm
wm / 001.go
Created Nov 8, 2015
casting-vs-calling-1
View 001.go
http.Handle("/yolo2", http.HandlerFunc(Yolo))
@wm
wm / handle.go
Last active Nov 8, 2015
casting-vs-calling
View handle.go
http.Handle("/yolo2", http.HandlerFunc(Yolo))
View keybase.md

Keybase proof

I hereby claim:

  • I am wm on github.
  • I am wmernagh (https://keybase.io/wmernagh) on keybase.
  • I have a public key whose fingerprint is E2C9 3136 5CC3 DA1C 9F5C 1A67 ED8C 249C 2A6A 260D

To claim this, I am signing this object:

@wm
wm / 0_README.md
Last active Aug 29, 2015
Extract uniq emails sorted by domain from file.
View 0_README.md

Extract uniq emails sorted by domain from file.

Note that we ignore emails of the form xxx@yyy.com, i.e. if it has a '<' we ignore it.

Usage

$ extract_emails.zsh file_with_emails.txt
example@example.com
ex@ex.com
@wm
wm / MavericksUpgrade.md
Last active Dec 26, 2015
Upgrade OSX to Mavericks (Xcode, brew, boxen etc.)
View MavericksUpgrade.md

Upgrades

  1. Install Mavericks
  2. Upgrade Xcode via App Store
  3. Launch Xcode to accept terms and auto install components
  4. Run the following commands
  • $ xcode-select --install # install command line tools if you have not already
  • $ boxen
  • $ brew update
View toggle_rspec_command.vim
let g:zeus_prefix = ""
let g:bundle_prefix = ""
let g:fdoc_prefix = ""
" Toggle the rspec_command
function! ToggleRspecCommand(prefix_name, prefix)
if g:{a:prefix_name}_prefix != ""
let g:{a:prefix_name}_prefix = ""
else
let g:{a:prefix_name}_prefix = a:prefix . " "
You can’t perform that action at this time.