Skip to content

Instantly share code, notes, and snippets.

View arashout's full-sized avatar

Arash Outadi arashout

View GitHub Profile
@thegedge
thegedge / git-tophat
Last active April 8, 2021 07:54
A git subcommand to "tophat" (build/run/test) a PR from a fork
#!/bin/zsh
function main {
if [[ ! "$1" =~ ".*:.*" ]]; then
echo "Empty username or branch name: \`$1\` should be of the form \`user:branch\`"
exit 1
fi
local username="${1%:*}"
local branch="${1#*:}"
@mmorearty
mmorearty / BUILD
Created March 23, 2018 15:47
Bazel stamp for a custom rule
load(":myrules.bzl", "mybundle")
mybundle(
name = "main",
srcs = ["in.txt"],
)
@BretFisher
BretFisher / docker-cli-tips-and-tricks.md
Last active December 6, 2023 19:49
Docker CLI Tips and Tricks
@hvoecking
hvoecking / translate.go
Last active September 26, 2024 12:20
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//