Create the ssh keys
ssh-keygen -t ed25519 -C my.email@example.com
# save to ~/.ssh/id_new_ssh_keys
tsplay () { | |
local app="$1" | |
local workspace="${2:-default}" | |
local default_root="$HOME/tsplay" | |
local work_root="${TSPLAY_ROOT:-$default_root}" | |
local workspace_dir="$work_root/$workspace" | |
local lsws="$(ls -1 "$work_root"|sort|sed 's/^/ /')" | |
local usage="Usage: tsplay -a <app> [-w <workspace>]\n" | |
usage+="Existing workspaces:\n" | |
usage+="$lsws" |
package main | |
import ( | |
"fmt" | |
"math" | |
"os" | |
"strconv" | |
"time" | |
) |
#!/usr/bin/env bash | |
# default root directory for goplay | |
GOPLAY_ROOT=""$HOME/goplay"" | |
# fn:goplay:create a go playground | |
function goplay() { | |
local module_name="${1:-anon}" | |
local ts="$(date +%Y-%m-%d_%H%M%S)" | |
local dirname="$GOPLAY_ROOT/$module_name-$ts" | |
local go_version=$(go version | awk '{print $3}' | sed -e 's/go//' | awk -F. '{print $1"."$2}') |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"regexp" | |
"strconv" | |
"time" |
#!/usr/bin/env bash | |
BUILD_TIME="$(date --iso-8601=seconds)" | |
COMMIT_SHA="$(git rev-parse HEAD 2>/dev/null && true)" | |
# or | |
# git rev-parse --short=8 HEAD 2>/dev/null && true | |
COMMIT_SHORT_SHA="${COMMIT_SHA:0:8}" | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD && true) |
var nativeEndian binary.ByteOrder | |
func setByteOrder() { | |
buf := [2]byte{} | |
*(*uint16)(unsafe.Pointer(&buf[0])) = uint16(0xABCD) | |
switch buf { | |
case [2]byte{0xCD, 0xAB}: | |
nativeEndian = binary.LittleEndian |
ssh-keygen -t ed25519 -C my.email@example.com
# save to ~/.ssh/id_new_ssh_keys
[ngStyle]={fontSize: '1em'}
[style.fontSize.em]=2
[style]={fontSize: '3em'}
style="font-size: 4em"
@Directive({host: {'[style.fontSize.em]': 5}})
@Directive({host: {'style': 'fontSize: 6em;'}})
keploy
Keploy is a no-code API testing platform that generates tests-cases and data-mocks from API calls. Dependency-mocks are automatically generated with the recorded request/responses.
#!/usr/bin/env bash | |
login_path="$1" | |
database_name="$2" | |
dir="$HOME/.mysql_backups" | |
/usr/local/bin/mysqldump --login-path="$login_path" "$database_name" | gzip > "$dir/$database_name-$(/bin/date +%Y-%m-%d_%H%M%S).sql.gz" |