-
update-ref
- update a branch (or other reference) to point to a specific commit sha
-
symbolic-ref
- update a reference (usually HEAD) to point to another reference (like a branch)
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
# /etc/bash/bashrc.d/git-prompt.sh | |
. /usr/share/git/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
if ${use_color} ; then | |
PS1=`echo "$PS1" | sed -r 's| \\\\\\$|\\\[\\\\033[01;31m\\\]$(__git_ps1)\\\[\\\\033[01;34m\\\] \\\\$|'` | |
else | |
PS1=`echo "$PS1" | sed -r 's| \\\\\\$|$(__git_ps1) \\\\$|'` | |
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
set editing-mode vi | |
set show-mode-in-prompt on | |
set vi-ins-mode-string "+" | |
set vi-cmd-mode-string ":" | |
$if mode=vi | |
set keymap vi-command | |
# these are for vi-command mode | |
Control-l: clear-screen |
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
### kubens - set default namespace for kubectl command | |
function kubens { | |
if [[ -n "$1" ]] ; then | |
alias kubectl="kubectl -n $1" | |
export HELM_NAMESPACE="$1" | |
PS1=$( echo "$PS1" | sed -r 's/(.*)\(ns:[^)]*\)(.*)/\1\2/' ) | |
PS1="(ns:$1)${PS1}" | |
else | |
unalias kubectl |
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
[Desktop Entry] | |
Name=Irexec daemon | |
Comment=Handle IR command server | |
Exec=/usr/bin/irexec | |
Icon=applications-system | |
Terminal=false | |
Type=Application | |
Categories=AudioVideo;Application;X-Fedora-Extra |
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 | |
# to be sourced by interactive shell or added to .bashrc | |
# | |
# kubectl temporary environment per session | |
# - any `kubectl config` changes (like use-context) go to temporary file | |
# | |
KUBETMPDIR=`mktemp -d` | |
[[ "$1" == "--merged" || "$1" == "-m" ]] && touch "${KUBETMPDIR}/kubeconfig" || cp "${HOME}/.kube/config" "${KUBETMPDIR}/kubeconfig" | |
eval "function kubetmp_cleanup { | |
rm -f ${KUBETMPDIR}/kubeconfig |
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
# Disable Gnome Keyring SSH agent in Ubuntu | |
# To allow using ssh-agent from OpenSSH, mainly because | |
# gnome-keyring does not like EC-type SSH keys | |
# as regular user (for which to disable): | |
systemctl --user mask gnome-keyring-ssh.service | |
pam-auth-update | |
# and disable "GNOME Keyring Daemon..." | |
# which probably also disables automatic keyring unlocking on login |
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
# show commit tree (possibly append --all for all branches) | |
git log --graph --oneline --decorate | |
# save previous as an alias and then just use 'git tree' | |
git config --global alias.tree "log --graph --oneline --decorate" | |
# restoring lost commit (e.g. after git reset --hard HEAD~1) | |
git fsck --lost-found | |
# or | |
git reflog | |
git merge <hash> |
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
SSLCipherSuite ECDHE:DHE:HIGH:+SHA1:!MEDIUM:!LOW:!EXP:!aNULL:!eNULL:!PSK:!RC4 | |
SSLHonorCipherOrder on | |
SSLProtocol all -SSLv3 | |
<VirtualHost ...> | |
SSLEngine on | |
Header always set Strict-Transport-Security "max-age=15552000" | |
Header set Public-Key-Pins "pin-sha256=\"yiUxVRHwMNoXtZZS/RtgPr2bCNyc6L8IJrmTU80HSlA=\"; pin-sha256=\"XQIfp7PhqFyw93tHv86EhngOxSVVdZy0Dj1mFmI81PM=\"; max-age=15552000" | |
SSLUseStapling on | |
... |
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
# Number of open file descriptors per process (replace 'httpd' with process name) | |
lsof -p $( echo `ps -o pid= -C httpd` | tr ' ' ',' ) | awk '{ print $2 }' | uniq -c | |
# Show swap usage per process, >=1000 kB | |
cat /proc/*/status | egrep -B30 '^VmSwap:[[:space:]]+[[:digit:]]{4,}' | egrep '^Name|^Pid|^VmSwap' | |
# generate password | |
head -c12 /dev/urandom | base64 | tr '+/' '_-' | tr -d '=' | |
# days to web server certificate expiry |
NewerOlder