This file contains hidden or 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/sh | |
dir=$(dirname $0) | |
name=$(basename $0) | |
export GIT_DIR="${GIT_DIR:-`git rev-parse --absolute-git-dir`}" | |
status=0 | |
for hook in $dir/$name.d/* "$GIT_DIR"/hooks/$name; do | |
if [ -x "$hook" ]; then | |
echo "Executing $name hook $hook" | |
"$hook" "$@" || status=$? |
This file contains hidden or 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 | |
function kube_molly_guard() { | |
local maxage=600 | |
local context="$(kubectl config current-context)" | |
local tsfile=~/.kube/ts/"$context" | |
local ts=0 |
This file contains hidden or 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
kube() { | |
local cluster="$1" | |
if [ -z "$cluster" ]; then | |
cluster="$(kubectl config current-context)" | |
if [ -n "$cluster" ]; then | |
export KUBECONFIG=/dev/null | |
return | |
fi |
This file contains hidden or 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
def includePath = '.gradle/include' | |
settingsEvaluated { settings -> | |
File include = new File(settings.rootDir, includePath) | |
if (!include.file) return | |
include.eachLine { | |
if (it.trim() =~ /^#/) return | |
if (it.trim().empty) return |
This file contains hidden or 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/sh | |
set -e | |
while [ "$PWD" != "/" ]; do | |
if [ -f "./build.gradle" ]; then | |
echo "$PWD/build.gradle" | |
break; | |
fi | |
if [ -f "./build.gradle.kts" ]; then |
This file contains hidden or 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://www.youtube.com/watch?v=ecIWPzGEbFc&t=3864s | |
"But the Business does not understand us [programmers]." ... | |
"These technical disciplines are not within the expertise of [the] Business. And they shouldn't be. They belong to us. That's part of our tech expertise." ... | |
"And the risk frankly, is ours to take. We own that risk. That is us." | |
"We are the ones who know that things need to be tested." | |
"We are the ones who know that things need to be refactored." | |
"We are the ones who know how to get software done, and so we have to take the risk, as part of our normal professional operation." |
This file contains hidden or 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
gradle.afterProject { p ->. | |
if (!rootProject.hasProperty("idea")) { | |
println "Not an IDEA root project: ${rootProject.name}" | |
return | |
} | |
if (!p.hasProperty("idea")) { | |
println "Not an IDEA project: ${p.name}" | |
return | |
} |
This file contains hidden or 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
Package: *nvidia* *nvidia*:i386 | |
Pin: release a=experimental | |
Pin-Priority: 950 |
This file contains hidden or 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/sh | |
objectpath=$1 | |
if [ -z "$objectpath" ]; then | |
echo "Usage:\n\t$(basename "$0") <path> < blob" >&2 | |
exit 1 | |
fi | |
objectid=$(git hash-object -w --stdin) | |
git update-index --add --cacheinfo 100644,"$objectid","$objectpath" |
This file contains hidden or 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/sh | |
format='%(color:magenta)%(objectname:short) %(color:blue)%(authordate:iso) %(authordate:relative);%(color:green)%(authorname);%(color:bold)%(color:white)%(HEAD)%(color:reset)%(color:yellow)%(refname:short)%(if)%(upstream:track)%(then)%(color:red) %(upstream:track)%(end);%(color:reset)%(contents:subject)' | |
git branch --sort=-creatordate --format="$format" --color=always|column -s ';' -t|less -RS -F |