Skip to content

Instantly share code, notes, and snippets.

View http-redirect.go
package main
import (
holman / emoji_test.rb
Last active Jun 18, 2020
A snapshot of the tests we use internally at GitHub to help edit our blog posts before they go out to everybody. For more information, take a peek at
View emoji_test.rb
require_relative "test_helper"
require "open-uri"
require "net/http"
class EmojiTest < Blog::Test
def test_no_emoji
posts.each do |post|
content =
refute_match /:[a-zA-Z0-9_]+:/, content,
ciaranarcher / example.go
Created Jul 27, 2014
Wrapping a ResponseWriter to capture the status code
View example.go
// Create our own MyResponseWriter to wrap a standard http.ResponseWriter
// so we can store the status code.
type MyResponseWriter struct {
status int
func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter {
// Default the status code to 200
return &MyResponseWriter{200, res}
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname