This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's/ *$//' | sort | awk '{print length, $0}' | sort -nrs | cut -d' ' -f2- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function goto() { | |
local p | |
local f | |
for p in `echo $GOPATH | tr ':' '\n'`; do | |
f=`find ${p}/src -maxdepth 3 -type d | grep ${1} | head -n 1` | |
if [ -n "$f" ]; then | |
cd $f | |
return | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RANGE=`expr "$CIRCLE_COMPARE_URL" : ".*compare\/\(.*\)"` | |
git log --oneline -i --grep "\[\(complete\|fix\|finish\).\+ #$1\]" $RANGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
LOCATION=$(cd `dirname $0`; pwd) | |
VOLUME=$(df -P $0 | awk 'NR!=1 {print $NF}') | |
DURATION="$1" | |
if [ -z "$DURATION" ]; then | |
NOW=$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "rest-client" | |
gem "awesome_print" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires GNU time | |
timed() { | |
local ts=$(date "+%FT%T%z" | tr -d "\n") | |
gtime --quiet -o "${HOME}/.timed" -a -f "${ts},%e,%C" -- $@ | |
} | |
alias git="timed git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Protocol, TypeVar, Generic, Any | |
T = TypeVar('T') | |
class Proxy(Generic[T]): | |
def __init__(self, proxied: T) -> None: | |
self._proxied = proxied |
OlderNewer