Originally written in January 2021.
Originally written for macOS Big Sur 11.1
Board used for this guide is the Kickstarter version.
Version at the time of writing is 1.8.13
Originally written in January 2021.
Originally written for macOS Big Sur 11.1
Board used for this guide is the Kickstarter version.
Version at the time of writing is 1.8.13
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
docker: 19 | |
commands: | |
- docker version | |
- curl -JLO https://github.com/docker/buildx/releases/download/v0.4.2/buildx-v0.4.2.linux-amd64 | |
- mkdir -p ~/.docker/cli-plugins |
// (see the blog post at https://andrewdupont.net/2018/04/27/laundry-spy-part-3-the-software/) | |
// GENERAL CONFIG | |
// ============== | |
// The baud rate of serial output for logging. If necessary, change the baud | |
// rate in your Serial Monitor to match this. | |
#define BAUD_RATE 115200 | |
// The name by which this device will identify itself over mDNS (Bonjour). |
# Basic benchmarks | |
# SET key val # 87489.06 | |
# SETRANGE key2 6 "Redis" # 75757.58 req/s | |
# INCR key 245 # 70224.72 req/s | |
# INCRBY key 245 22 # 67114.09 req/s | |
# EVAL SET key val # 46296.29 req/s | |
# SETIFHIGHER (set or update key if new value is higher than current) # 41666.67 req/s | |
# if not exists return OK , if updated return the increment , if not updated return 0 | |
SCRIPT LOAD "local c = tonumber(redis.call('get', KEYS[1])); if c then if tonumber(ARGV[1]) > c then redis.call('set', KEYS[1], ARGV[1]) return tonumber(ARGV[1]) - c else return 0 end else return redis.call('set', KEYS[1], ARGV[1]) end" |
#!/bin/bash | |
instance_profile=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/` | |
aws_access_key_id=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep AccessKeyId | cut -d':' -f2 | sed 's/[^0-9A-Z]*//g'` | |
aws_secret_access_key=`curl http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | grep SecretAccessKey | cut -d':' -f2 | sed 's/[^0-9A-Za-z/+=]*//g'` | |
token=`curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${instance_profile} | sed -n '/Token/{p;}' | cut -f4 -d'"'` | |
file="somefile.deb" | |
bucket="some-bucket-of-mine" | |
date="`date +'%a, %d %b %Y %H:%M:%S %z'`" |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
redis-cli EVAL "$(cat hello.lua)" 0 |