Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
package main
import (
"fmt"
"time"
)
type coisa struct {
nome string
cComecar chan bool
@honkskillet
honkskillet / byte-sizetuts.md
Last active June 18, 2022 14:18
A series of golang tutorials with youtube videos.
@holman
holman / emoji_test.rb
Last active June 18, 2020 01:27
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 http://zachholman.com/posts/how-github-writes-blog-posts
require_relative "test_helper"
require "open-uri"
require "net/http"
class EmojiTest < Blog::Test
def test_no_emoji
posts.each do |post|
content = File.read(post)
refute_match /:[a-zA-Z0-9_]+:/, content,
package main
import (
"flag"
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
@ciaranarcher
ciaranarcher / example.go
Created July 27, 2014 06:53
Wrapping a ResponseWriter to capture the status code
// Create our own MyResponseWriter to wrap a standard http.ResponseWriter
// so we can store the status code.
type MyResponseWriter struct {
status int
http.ResponseWriter
}
func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter {
// Default the status code to 200
return &MyResponseWriter{200, res}