Skip to content

Instantly share code, notes, and snippets.

View denisolnce's full-sized avatar

Denis Solnce denisolnce

View GitHub Profile
@denisolnce
denisolnce / infra.sh
Last active March 24, 2022 15:32
[Renovate logs] Get logs for specific repository
#Usage: renovate_log_grep renovate-job-pod-f43jn my-app
renovate_log_grep() {
repo_txt="(repository=bidstack/${2:?repo name required as arg 2})"
tmp_file=${1:?pod name required as arg 1}.log
kubectl logs ${1} > $tmp_file
START=$(grep -n "started ${repo_txt}" $tmp_file | cut -f1 -d:)
FINISH=$(grep -n "finished ${repo_txt}" $tmp_file | cut -f1 -d:)
sed -n "$START, $FINISH p" $tmp_file || echo "repo not found"
@denisolnce
denisolnce / fkeys.app
Created January 22, 2017 14:55
OS X global shortcut for making f1-12 keys usable without FN key and reverting it back
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
click checkbox 1 of tab group 1 of window 1
end tell
quit application "System Preferences"