View main.go
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 ( | |
"log" | |
"net/http" | |
"strconv" | |
"time" | |
"gopkg.in/antage/eventsource.v1" | |
) |
View _assert.md
assert
import "github.com/stretchr/testify/assert"
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
View main.go
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" | |
"reflect" | |
"strconv" | |
) | |
type invalidStrNums []int |
View Makefile
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
# Just completions | |
# just --completions zsh | sudo tee /usr/local/share/zsh/site-functions/_just | |
# zinit creinstall -q /usr/local/share/zsh/site-functions/ | |
export http_proxy := "http://172.31.100.7:3128/" | |
# https://uk.lxd.images.canonical.com/images/ | |
# https://cloud-images.ubuntu.com/impish/current/ | |
# 537M Ubuntu Server Cloud Image Builds |
View README.md
Layer export for OmniGraffle
If you have a Graffle document (doc.graffle) with a canvas named "mycanvas" holding the following layers ...
- Extra 3
- Extra 2
- Extra 1
- Base
... then these images will be generated:
View gcp-iam-restrict-user-bucket.sh
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
#!/usr/bin/env bash | |
export PROJECT_ID=$(gcloud config get-value project) | |
export PROJECT_USER=$(gcloud config get-value core/account) # set current user | |
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)") | |
export IDNS=${PROJECT_ID}.svc.id.goog # workload identity domain | |
export GCP_REGION="us-central1" | |
export GCP_ZONE="us-central1-a" |
View vpn
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
#!/usr/bin/env bash | |
run_list() { | |
osascript <<OSA | |
tell application "Viscosity" | |
repeat with theConnection in connections | |
set theName to name of theConnection | |
set theState to state of theConnection | |
log theName & ": " & theState | |
end repeat |
View bluetooth_sleep.lua
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
require "string" | |
function checkBluetoothResult(rc, stderr, stderr) | |
if rc ~= 0 then | |
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout)) | |
end | |
end | |
function bluetooth(power) | |
print("Setting bluetooth to " .. power) |
NewerOlder