https://redis.com/blog/go-redis-official-redis-client/
curl https://gist.githubusercontent.com/dolmen/9f5b4b1892588a5a8948a7c8e116660b/raw/dafeeb86c5c1c1fe80499b0c652f218c3c69aebd/migrate-go-redis-v9.sh | bash
#!/bin/bash | |
# Commands to evaluate impact of xz installed via homebrew. | |
# Author: Olivier Mengué. | |
# Show info about xz bottle: | |
brew info xz | |
# Upgrade xz: | |
brew update |
<html> | |
<head> | |
<meta http-equiv="refresh" content="0; url=https://github.com/" /> | |
</head> | |
<body> | |
</body> |
https://redis.com/blog/go-redis-official-redis-client/
curl https://gist.githubusercontent.com/dolmen/9f5b4b1892588a5a8948a7c8e116660b/raw/dafeeb86c5c1c1fe80499b0c652f218c3c69aebd/migrate-go-redis-v9.sh | bash
/* | |
kh-to-hashcat allows to convert an OpenSSH known_hosts hashed file to a | |
format that can be used with hashcat to recover hosts. | |
Note that as the know_hosts file usually contains multiple keys for each host | |
it is wise to filter the file to a single key type to filter redundant hashes. | |
Check this stat: | |
perl -nE '$c{$1}++ if /^\|1\|[^ ]+ ([^ ]+)/;END{say "$_: $c{$_}" for keys %c}' ~/.ssh/known_hosts |
Hacks below use goproc to experiment with Go templates from the command-line.
$ echo false | goproc -e '{{.}} => {{index "....\001\000" (len (print .))}}{{"\n"}}'
false => 0
$ echo true | goproc -e '{{.}} => {{index "....\001\000" (len (print .))}}{{"\n"}}'
# git go-version: shows the Go-modules versionning formatting of a Git commit | |
git config --global alias.go-version '!f(){ cd -- "${GIT_PREFIX:-.}"; TZ=UTC git log -1 '\''--date=format-local:%Y%m%d%H%M%S'\'' --abbrev=12 '\''--pretty=tformat:v0.0.0-%cd-%h'\'' "$@" ;};f' | |
# git go-get: shows the command to run on another Go project to upgrade this module | |
git config --global alias.go-get '!f(){ cd -- "${GIT_PREFIX:-.}"; TZ=UTC git log -1 '\''--date=format-local:%Y%m%d%H%M%S'\'' --abbrev=12 '\''--pretty=tformat:go get '\''"$(go list -m)"'\''@v0.0.0-%cd-%h'\'' "$@" ;};f' | |
# git go-shortlog: shows the 10 commits in Go-modules versionning style | |
git config --global alias.go-shortlog '!f(){ cd -- "${GIT_PREFIX:-.}"; TZ=UTC git log -10 '\''--date=format-local:%Y%m%d%H%M%S'\'' --abbrev=12 '\''--pretty=tformat:v0.0.0-%cd-%h %s'\'' "$@" ;};f' |
// Fix (some kinds of) malformed URLs | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/url" | |
) |