image from https://i.stack.imgur.com/KTSQa.png, author is unknown for me
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
## Global vars | |
export LESS='--buffers=128 --HILITE-UNREAD --ignore-case --LONG-PROMPT --max-back-scroll=15 --no-init --quiet --quit-at-eof --quit-if-one-screen --RAW-CONTROL-CHARS --status-column --tabs=4 --window=-4' | |
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' | |
export FZF_DEFAULT_OPTS='--height 50% --ansi --info=inline' | |
export EDITOR='/usr/local/bin/nvim' | |
## zinit | |
source ~/.zinit/bin/zinit.zsh |
systemd journalctl cheatsheet / tldr
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
#!/bin/sh | |
# Create repository in Github with correct escaping in repo name | |
# Requires {@code GITHUB_TOKEN} env var. | |
# @return ssh url to created repository which can be used in git clone command | |
jq --null-input --compact-output \ | |
--arg repo 'my-awesome-project' \ | |
'{name: $repo}' \ | |
| curl \ |
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
final List TestCases = [ | |
'/usr/bin/sh', | |
'//usr/bin/sh', | |
'usr//bin/sh', | |
'usr//bin//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
String DIR = '/data/jenkins/workspace/UISW-C-UI/Daily/c-daily-build' | |
void executeInBash(String bashCommand) { | |
java.lang.Process process = ['/bin/bash', '-c', bashCommand].execute() | |
process.waitFor() | |
println process.getText() | |
} | |
////// |
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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' | |
// 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' | |
// 1 |
NewerOlder