Skip to content

Instantly share code, notes, and snippets.

View fedorkanin's full-sized avatar

Fedor Kanin fedorkanin

View GitHub Profile
@prateek
prateek / reporter.go
Created May 6, 2018 03:32
gomock.Reporter
// Package test contains utility methods for testing.
package test
import (
"fmt"
"testing"
"github.com/golang/mock/gomock"
)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 16, 2025 02:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@eguven
eguven / brew-list.sh
Last active August 3, 2025 19:24
List all packages installed using Homebrew and their sizes
# this original one uses values returned from 'brew info'
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
# faster alternative using 'du'
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h