Prints something like this:
In 2018 you made 2488 commits in 134 projects.
The average length of a commit message was 62 characters.
Commits per weekday
Monday 334 ******************************************
#!/usr/bin/env bash | |
# Print n blank lines | |
# | |
# @param 1 - number of blank lines to print (default 1) | |
blanks() { | |
local I | |
for (( I=${1:-1}; I--; )) | |
do | |
echo |
import android.content.Context; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.graphics.Point; | |
import android.os.Build; | |
import android.util.TypedValue; | |
public class SystemBarMetrics { | |
public static int getStatusBarHeight(Resources res) { | |
return getIdentifierDimen(res, "status_bar_height"); |
#!/usr/bin/env bash | |
# Add, commit, tag and push | |
tag_and_push() | |
{ | |
# find version (x.x.x) in uncommitted changes | |
local VERSION='' | |
VERSION=$(git diff -U0 | | |
grep -E "^\+.*([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})") |
static int horizontal_check_sum(int number) { | |
int sum = 0; | |
for (int i = 1, mod = 0; mod != number; i *= 10) { | |
mod = number % (i * 10); | |
sum += mod / i; | |
} | |
return sum; | |
} |
I hereby claim:
To claim this, I am signing this object:
Synchronize (the contents of) a repository with a local directory. Can be used to manually update "embedded" repositories (aka subtree's).
Does not touch the host repository's stage or history. You have to add and commit the changed files manually. Write a good commit message and have a clean history.
#!/usr/bin/env bash | |
for FILE in ${*:-*} | |
do | |
echo ">>> $FILE" | |
while true | |
do | |
read -r -n 1 -p '[s]kip, [r]emove, [i]nspect or [q]uit? ' | |
echo |
#!/usr/bin/env bash | |
# Put given badge on launcher icons for another build | |
# | |
# @param 1 - badge overlay | |
# @param 2 - build name (and local directory) | |
badge() | |
{ | |
local BADGE=$1 | |
local BUILD=$2 |