https://www.logitechg.com/en-us/products/gaming-mice/g502-x-wired-lightforce.910-006136.html
/sys/class/hidraw/hidraw2/device/uevent
DRIVER=hid-generic
HID_ID=0003:0000046D:0000C099
package main | |
import ( | |
"io" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) |
var topojsonClient = require("topojson-client") | |
ch = await fetch("https://swiss-maps.vercel.app/api/v0?format=topojson&projection=wgs84&year=2022&shapes=lakes").then(res => res.json()) | |
geo = topojsonClient.feature(ch, ch.objects.lakes) | |
console.log(JSON.stringify(geo, null, 2)) |
https://www.logitechg.com/en-us/products/gaming-mice/g502-x-wired-lightforce.910-006136.html
/sys/class/hidraw/hidraw2/device/uevent
DRIVER=hid-generic
HID_ID=0003:0000046D:0000C099
The following python script calculates the network addresses in CIDR notation (ready to be set in the config to AllowedIPs =
) to route all traffic (0.0.0.0/0
) except for one address (30.31.32.33/32
) through the wireguard interface. This is usefull if you run wireguard over another tunnel (e.g. udp2raw).
$ python3
import ipaddress
n1 = ipaddress.ip_network('0.0.0.0/0')
n2 = ipaddress.ip_network('30.31.32.33/32')
l = list(n1.address_exclude(n2))
{ | |
"data": { | |
"questionnaire": { | |
"id": "f44ac7ae-fa51-4565-aa90-fbcbf42bba40", | |
"userMainstreamScore": 0, | |
"answerSets": { | |
"userAnswerSet": null, | |
"sets": [ | |
{ | |
"id": "1111100000", |
outbound | day | hour | label | |
---|---|---|---|---|
true | 1204844400000 | 1502 | 07.03.2008 15:02 | |
true | 1205276400000 | 1133 | 12.03.2008 11:33 | |
false | 1205276400000 | 1548 | 12.03.2008 15:48 | |
true | 1205362800000 | 053 | 13.03.2008 00:53 | |
true | 1205535600000 | 110 | 15.03.2008 01:10 | |
false | 1207692000000 | 1546 | 09.04.2008 15:46 | |
false | 1208296800000 | 1755 | 16.04.2008 17:55 | |
true | 1208383200000 | 1438 | 17.04.2008 14:38 | |
true | 1208383200000 | 1448 | 17.04.2008 14:48 |
How to archive a repo and copy the last n commits to a new one. republik/magazine
is used as an example here.
rebase-from
git config --global alias.rebase-from '!b="$(git branch --no-color | cut -c3-)" ; h="$(git rev-parse $b)" ; echo "Current branch: $b $h" ; c="$(git rev-parse $1)" ; echo "Recreating $b branch with initial commit $c ..." ; git checkout --orphan new-start $c ; git commit -C $c ; git rebase --onto new-start $c $b ; git branch -d new-start ; git reflog expire --expire=all ; git gc --prune=all'
//https://www.fileformat.info/info/unicode/char/0308/index.htm | |
//https://vi.stackexchange.com/questions/3557/can-i-search-for-a-unicode-combining-character-in-vim | |
const fs = require('fs') | |
const path = __dirname+'/article.md' | |
const buffer = fs.readFileSync(path) | |
const fixed = buffer.toString('utf8') | |
.replace(/a\u0308/g, 'ä') |
heroku redis:cli redis-NAME -a republik-api
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 *publication