Working to sniff Bluetooth Low Energy with the adafruit sniffer
For more information, see this blog post
Going the python route, as described here
before installing pySerial, did ...
const fs = require('fs') | |
const gm = require('gm').subClass({ imageMagick: '7+' }); | |
WIDTH = 1138 | |
HEIGHT = 50 | |
X = 0 | |
Y = 0 | |
gm('./images/us_at_bottom.png') | |
.region(WIDTH, HEIGHT, X, Y) |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": "arn:aws:s3:::*" | |
}, |
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET", | |
"HEAD" | |
], | |
"AllowedOrigins": [ |
Working to sniff Bluetooth Low Energy with the adafruit sniffer
For more information, see this blog post
Going the python route, as described here
before installing pySerial, did ...
// from https://github.com/iamkun/dayjs/issues/1619#issuecomment-1185714859 | |
const round: PluginFunc = (option, dayjsClass) => { | |
dayjsClass.prototype.round = function (amount, unit) { | |
const mod = this.get(unit as UnitType) % amount; | |
if(mod < amount / 2) { | |
return this.subtract(mod, unit).startOf(unit); | |
} |
// npm install mapshaper --save | |
import mapshaper from 'mapshaper' | |
// Example: converting a directory of Shapefiles to GeoJSON | |
mapshaper.runCommands('-i shapefiles/*.shp -o geojson/ format=geojson'); |
// installation: | |
// npm install dayjs dayjs-plugin-utc --save | |
// note: if not already a module, in package.json add "type":"module", | |
import dayjs from 'dayjs'; | |
import updateLocale from 'dayjs/plugin/updateLocale.js'; | |
import utc from 'dayjs/plugin/utc.js'; | |
import timezone from 'dayjs/plugin/timezone.js'; | |
// set up the as-of date |
const time_hash = Date.now().toString(36); | |
// reverse it for more wordiness: | |
const time_hash2 = Date.now().toString(36).split("").reverse().join("") |
function delay(time) { | |
return new Promise(resolve => setTimeout(resolve, time)); | |
} | |
// usage: | |
console.log("Thing one") | |
await delay(2000) | |
console.log("Thing two, two seconds later") |
#!/bin/sh | |
# copied from https://github.com/truist/settings/blob/master/bin/git_export_all_file_versions | |
# more details here: https://stackoverflow.com/questions/12850030/git-getting-all-previous-version-of-a-specific-file-folder | |
# based on script provided by Dmitry Shevkoplyas at http://stackoverflow.com/questions/12850030/git-getting-all-previous-version-of-a-specific-file-folder | |
set -e | |
if ! git rev-parse --show-toplevel >/dev/null 2>&1 ; then | |
echo "Error: you must run this from within a git working directory" >&2 |