Skip to content

Instantly share code, notes, and snippets.

@haya14busa
haya14busa / main.go
Created November 1, 2016 23:32
サンプル: Golangにおけるinterfaceをつかったテストで mock を書く技法
package main
import (
"context"
"fmt"
)
type GitHub interface {
CreateRelease(ctx context.Context, opt *Option) (string, error)
GetRelease(ctx context.Context, tag string) (string, error)
@shkumagai
shkumagai / how_to_write_go_code.rst
Last active March 30, 2023 03:54
How to Write Go Code
@BugRoger
BugRoger / ssh-background
Created January 21, 2011 16:02
Changes iTerm2's background color based on host configuration
#!/bin/bash
# Installation:
# 1. Save this script to /some/bin/ssh-background
# 2. chmod 755 /some/bin/ssh-background
# 3. alias ssh=/some/bin/ssh-background
# 4. Configure your host colors below.
set_color() {
local HEX_FG=$1
local HEX_BG=$2