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/sh | |
| # From Gerrit Code Review 2.14.1-1490-gf292b12563 | |
| # | |
| # Part of Gerrit Code Review (https://www.gerritcodereview.com/) | |
| # | |
| # Copyright (C) 2009 The Android Open Source Project | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at |
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 | |
| # https://gist.github.com/davidwalter0/1a96b1afe5794f2a0c8d50e1de3e8aa4 | |
| # https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools | |
| domain=${1} | |
| if (( $# < 1 )); then | |
| echo usage ${0##*/} domain | |
| exit 1 | |
| fi | |
| echo | \ | |
| openssl s_client -showcerts -servername ${domain}\ |
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
| 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 |
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
| # 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 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
| - 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 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
| [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 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
| ;;; 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 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
| // 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 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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "net/url" | |
| "os" |
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 | |
| 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 - |