View parse_vector_pathData.rb
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
# ruby parse_vector_pathData.rb "<pathData>" | |
# | |
# @example ruby parse_vector_pathData.rb "M2...Z" | |
# | |
# <pathData> is a pathData attribute of path node. | |
pathData = ARGV[0] | |
kotlinPathNodeChunks = [] |
View created a repository
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
https://github.com/jmatsu/export-docker-dotenv |
View .zshrc
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
proxy-git() { | |
if ! type command > /dev/null 2>&1; then | |
git "$@" | |
elif let "$# > 0"; then | |
# git git git git... :) | |
while [[ "$1" == "git" ]]; do | |
shift 1 | |
done | |
if [[ "$1" = "stash" ]]; then |
View script-template.sh
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
View example.bash
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
# Register a filter command for Git commands | |
git config --system --add mine.filter fzf | |
# Show checked-out branches in reflog (distinct, and not sorted by the checked-out time) | |
git config --system --add alias.head-history "\!f() { git reflog HEAD | grep 'checkout:' | awk '\$0=\$NF' | sort | uniq; }; f" | |
# Select and switch HEAD to the branch | |
git config --system --add alias.switch-to "\!f() { local -r ref=\"\$(git head-history | \$(git config --get mine.filter))\"; [[ -n \"\$ref\" ]] && git switch \"\$ref\"; }; f" |
View packaged
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
https://github.com/jmatsu/mc-migration |
View get_default_branch_name.sh
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
# get the default branch of the current repository. NOTE that this will requires the network connection | |
git config --global alias.default-branch "\!f() { git ls-remote --symref \$(git remote get-url origin) HEAD | grep 'refs/heads' | awk '\$0=\$2' | sed 's/refs\/heads\///'; }; f" | |
# then run git default-branch |
View old_install.sh
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
export ANDROID_HOME="$HOME/sdk" | |
curl -o sdk-tools.zip "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" | |
unzip "sdk-tools.zip" -d $ANDROID_HOME | |
$ANDROID_HOME/tools/bin/sdkmanager <package>... |
View new_install.sh
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
# BAD | |
export ANDROID_HOME="$HOME/sdk" | |
curl -o sdk-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip" | |
unzip "sdk-tools.zip" -d $ANDROID_HOME | |
$ANDROID_HOME/tools/bin/sdkmanager <package>... | |
# GOOD | |
export ANDROID_SDK_ROOT="$HOME/sdk" | |
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools | |
curl -o sdk-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip" |
View install.bash
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
die() { | |
echo "$*" >&2 | |
exit 1 | |
} | |
warn() { | |
echo "$*" >&2 | |
} | |
if [[ ! -d ".git/hooks" ]]; then |
NewerOlder