(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# Linux | |
# add the following to "~/.gitconfig" file | |
[merge] | |
tool = intellij | |
[mergetool "intellij"] | |
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = true | |
[diff] |
sed -r "/$EXCLUDING_PATTERN_1|$EXCLUDING_PATTERN_2/!s/$FIND_STRING/$REPLACE_STRING/" |
How to delete an image tag/image from docker registry v2.4 | |
1) Re/Start registry with delete option enabled | |
Edit the config.yml | |
storage: | |
delete: | |
enabled: true |
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 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
kubectl create namespace mynamespace
This file used to name this gist. |
//all job name | |
jenkins.model.Jenkins.instance.items.each { | |
println "Job: ${it.name}" | |
} | |
//method list of Jenkins instance | |
jenkins.model.Jenkins.instance.class.methods.each { | |
println "Jenkins method: ${it.name}" | |
} |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
1. Copy and paste the two lines below, followed by CTRL-D to force change your passwd on an insecure docker installation: | |
export X=$(cat); eval $X | |
ID=user_id docker run -ti --rm --privileged --name passwd --hostname passwd -v /:/rooted alpine sh -c "chroot /rooted passwd $ID" ; unset X | |
2. To clean up the command line history, use: | |
up-arrow, CTRL-U, down-arrow, ENTER | |