In the below Go file we use bitwise operators to manipulate individual flags (on/off switches) in a single integer, where each bit position represents a different status.
In case you need a reminder of a what bit alignment and shifting look like:
11 02 08:24:01 "GET /index.html" 400 152 | |
11 02 08:24:03 "POST /api/login" 201 98 | |
11 02 08:24:05 "GET /images/logo.png" 404 134 | |
11 02 08:24:07 "DELETE /api/resource/123" 204 65 | |
11 02 08:24:09 "PUT /api/item" 400 189 | |
11 02 08:24:10 "PATCH /api/user/profile" 200 102 | |
11 02 08:24:12 "GET /products" 400 115 | |
11 02 08:24:14 "POST /api/order" 201 177 | |
11 02 08:24:16 "GET /about" 200 98 | |
11 02 08:24:18 "DELETE /api/cart/1" 200 145 |
Note
The whole reason I bothered doing this is because I hate it when macOS notifies me that my mouse is "critically" low on charge, as it forces me to have to stop work for charging my mouse. I'd prefer to know at around 50% charge so I can continue working but stick my mouse on charge when I go for lunch or finish my day.
Start by writing an AppleScript file that is essentially just a wrapper around a bash script...
do shell script "
# Get the battery percentage for the Magic Mouse
mouseBattery=$(ioreg -c AppleDeviceManagementHIDEventService -r | grep -i '\"Product\" = \"Magic Mouse\"' -A 20 | grep '\"BatteryPercent\" =' | awk '{print $NF}')
$ go run main.go
Querying root server 198.41.0.4 for TLD com...
Selected TLD server: g.gtld-servers.net.
Resolved TLD server IP: 192.42.93.30
Querying TLD server 192.42.93.30 for domain coca-cola.com...
Selected authoritative server: ns4-09.azure-dns.info.
Resolved authoritative server IP: 208.84.5.9
Querying authoritative server 208.84.5.9 for domain coca-cola.com...
# 0. Have a binary to codesign. | |
# NOTE: I use `if os.Getenv("SKIP_FTP") != "" { t.Skip("...") }` to allow skipping the test when running the full test suite. | |
go test -c -o ./path/to/package/test_binary ./path/to/package | |
# 1. Create self-signed private key and certificate | |
# IMPORTANT: The `-addext` flags are essential for codesigning purposes. | |
openssl req -new -x509 -days 365 -nodes \ | |
-keyout ExampleTestBinaryCodeSigning.key -out ExampleTestBinaryCodeSigning.crt \ |
OpenSSL is a versatile command line tool that can be used for a large variety of tasks related to Public Key Infrastructure (PKI) and HTTPS (HTTP over TLS).
If you would like to obtain an SSL certificate from a commercial certificate authority (CA), you must generate a certificate signing request (CSR). A CSR consists mainly of the public key of a key pair, and some additional information. Both of these components are inserted into the certificate when it is signed.
// Package main is the entrypoint to the proxy CLI program. | |
package main | |
import ( | |
"bytes" | |
"context" | |
"errors" | |
"flag" | |
"fmt" | |
"io" |
name: Update Dependencies and Run Tests | |
on: | |
# Schedule to run at 9am UTC every day | |
schedule: | |
- cron: '0 9 * * *' | |
# Allow manual trigger via GitHub UI | |
workflow_dispatch: |
SKU stands for stock-keeping unit.
It is mostly the unit used by Salesforce, and all other business systems to 'sell' and invoice for products/features we sell
It can take up to a quarter or more to get a SKU.
You can't sell something for $$ without a SKU.
Monetization engineering often won't get started on any work without a SKU/product description in Salesforce.