Skip to content

Instantly share code, notes, and snippets.

View octylFractal's full-sized avatar
🦞
trans rights

Octavia Togami octylFractal

🦞
trans rights
View GitHub Profile
@octylFractal
octylFractal / git-psh
Last active February 8, 2019 04:19
git psh (push -u -> psh): Push and set upstream if needed
#!/usr/bin/env bash
red="$(tput setaf 1)"
green="$(tput setaf 2)"
cyan="$(tput setaf 6)"
reset="$(tput init)"
branch="$(git rev-parse --abbrev-ref HEAD)"
[[ $? == 0 ]] || { echo "$red"'git `psh` cannot work without a branch'"$reset"; exit 1;}
upstream="$(git rev-parse --abbrev-ref "$branch"'@{u}' 2>/dev/null)"
if [[ $? == 0 ]]; then
@octylFractal
octylFractal / git-nocomment.sh
Last active November 17, 2015 07:49
for when you have no good comment
#!/usr/bin/env bash
git commit "$@" -m "$(curl -s http://whatthecommit.com/index.txt)"
exit $?
<blockstate> == {
"forge_marker": 1,
"defaults": <variant>, // optional, added to all variants
"variants": {
"<property>": {
"<value>": <variant> // variant definition for the specified value of this property; variants for multiple values can be specified.
},
"<variant name>": <variant>, // variant definition for the full variant string
"<variant name>": [<variant1>, ...], // array of definitions for the full variant - result will be the random variant
}