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
Some test text |
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/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
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/bash | |
kubectl get no -o json|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata' | cat - | |
curl 0.0.0.0:8080/api/v1/nodes|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata' | cat - | |
kubectl get no -o json|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata.annotations."flannel.alpha.coreos.com/backend-data"' | cat - | |
curl -s 0.0.0.0:8080/api/v1/nodes|jq -r '.items[]|select(.metadata.name == "node1.example.com")|.metadata.annotations.flannel.alpha.coreos.com/backend-data' | cat - |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" | |
"os" |
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
// https://gist.github.com/davidwalter0/60f41b53732656c5c546cc8b0a739d11 | |
// x/vgo: thoughts on selection criteria for non-versioned go repo | |
// Run git branch version selection for non-vgo versioned repository | |
// as if in a wayback machine. | |
// Use the dependency's commit ctime as the wayback ctime. | |
// Commits prior to the wayback ctime in sub-dependencies are eligible. | |
// Use the newest commit prior to the wayback ctime. |
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
;;; package --- mode for go.mod files | |
;;; Commentary: | |
;;; font-lock syntax for go.mod files | |
;;; | |
(setq vgo-highlights | |
'( | |
;;; go.sum | |
("^\\([^ ]*\\) *[^ ]* h1:*[^ ]*=$" . (1 font-lock-keyword-face)) | |
("^[^ ]* *\\([^ ]*\\) h1:*\\([^ ]*=\\)$" . (1 font-lock-builtin-face)) |
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
[alias] | |
# create an un-versioned version faux tag string with v0.0.0-date-commit format | |
# github.com/davidwalter0/hello v0.0.0-20180519105930-66b6dd4eb1dd | |
vgo-version = "!TOP=$(git rev-parse --show-toplevel); git log -n 1 --abbrev=12 --date=format:'%Y%m%d%H%M%S' --pretty=format:\"${TOP#${GOPATH}/src/} v0.0.0-%cd-%h\";echo" |
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
- name: Ping David to fix config | |
delegate_to: localhost | |
shell: | | |
. ${HOME}/bin/sms.environment | |
${HOME}/bin/send.$(uname -s|tr [A-Z] [a-z]) "status update from app..." | |
- name: Pause for config | |
pause: | |
seconds: 120 |
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
# https://stackoverflow.com/questions/6543519/undoing-accidental-git-stash-pop | |
# https://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git | |
accepted | |
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen (thanks, Dolda). | |
Otherwise, you can find it using this for Linux and Unix: | |
git fsck --no-reflog | awk '/dangling commit/ {print $3}' | |
and for Windows: |
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
rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' | |
To list all packages, sorted by install date, latest first: | |
rpm -qa --last | |
This should work on any RPM based machine: | |
rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -n |
NewerOlder