Skip to content

Instantly share code, notes, and snippets.

View hkbu-kennycheng's full-sized avatar

Kenny Cheng hkbu-kennycheng

View GitHub Profile

DW3000 "missing manual" notes

Overall

The DW3000 is an exciting part, available as a convenient Arduino-shield eval board with good distribution. HOWEVER, this is NOT a "maker friendly" part with SparkFun or Adafruit type tutorials and examples! It is a sophisticated radio that can be the heart of a positioning system, but you have to do quite a lot of heavy lifting to get there.

For basic use, the older-but-still-good DW1000 may be a better choice; interface libraries are available for Arduino and Raspberry Pi. Or look into packaged location-system vendors, like Estimote, Pozyx, Ubitrack and many others

@hkbu-kennycheng
hkbu-kennycheng / revprox.go
Created October 25, 2024 15:41 — forked from JalfResi/revprox.go
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@hkbu-kennycheng
hkbu-kennycheng / block_list.txt
Last active July 9, 2024 14:54
my custom dns block list
[Adblock Plus]
! Version: 202407081715
! Title: oisd big
! Description: Block. Don't break.
! Syntax: Adblock Plus Filter List
! Entries: 180711
! Last modified: 2024-07-08T17:15:21+0000
! Expires: 1 hours
! License: https://github.com/sjhgvr/oisd/blob/main/LICENSE
! Maintainer: Stephan van Ruth
@hkbu-kennycheng
hkbu-kennycheng / smtp_server.py
Created October 4, 2023 16:23 — forked from amirasaran/smtp_server.py
Python3 SMTP (smtpd) Mail Server with authentication sample + smtpd TLS support
import asynchat
import base64
import ssl
import asyncore
from smtpd import SMTPServer as BaseSMTPServer, SMTPChannel as BaseSMTPChannel, DEBUGSTREAM
def decode_b64(data):
"""Wrapper for b64decode, without having to struggle with bytestrings."""
#!/bin/sh
apk add go git
go install github.com/ncarlier/webhookd@master
mkdir -p /webhook/scripts
echo '#!/bin/sh' > /webhook/scripts/pull.sh
chmod +x /webhook/scripts/pull.sh
echo 'cd /app && git pull' >> /webhook/scripts/pull.sh
cd /webhook && /root/go/bin/webhookd &
#!/bin/sh
apk add go git
mkdir -p /webhook/scripts
go install github.com/ncarlier/webhookd@master
echo '#!/bin/sh' > /webhook/scripts/pull.sh
chmod +x /webhook/scripts/pull.sh
echo 'cd /app && git pull' >> /webhook/scripts/pull.sh
@hkbu-kennycheng
hkbu-kennycheng / .bash_profile
Created February 13, 2023 04:52
export nvm for .bash_profile
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
We can't make this file beautiful and searchable because it's too large.
,name,id,url,pic,price,specialoffer,brand,category,variant,variantname,topseller,fairtrade,organic,eshoponly,healthyfat,crustacean,Product Details,Origin,Product Warnings,Product Usage,Storage Condition,Ingredients
0,Alkaline Water 9.0 (random Pick),499585,https://www.parknshop.com/en/alkaline-water-9-0/p/BP_499585,https://www.parknshop.com/medias/sys_master/front/prd/9676792102942.jpg,9.0,,WATSONS,Water,499585,420ML,False,False,False,False,False,False,- Smart way to hydrate your body- Helps to neutralize acidity- Helps to facilitate a more alkaline water base- Perfectly balanced formula of electrolytes to help keep your cells happy,Hong Kong,This product contains minerals and is electrolyzed by platinized titanium ionizer. Sedimentation is a natural phemenon.,Consume shortly after opening.,Keep in a cool dry place away from direct sunlight. Consume shortly after opening.,"Water, Ocean Mineral Concentrate"
1,Alkaline Water 9.0 (case) (420ml X 24 Bottles),378829,https://www.parknshop.com/en/alkaline-water-9-0-
We can't make this file beautiful and searchable because it's too large.
,name,packing,sales,reviews,price,store_name
0,Chupa Chups - Direct from France - CHUPA CHUPS - CHUPA CHUPS - Mini - (30pcs) 180g,,200+ Sold,(2),$ 41.00,LAZUR GOURMET
1,L'Azur Gourmet - PAYSANS D'ICI - Organic Apple Juice - 1L,,60+ Sold,,$ 79.00,LAZUR GOURMET
2,L'Azur Gourmet - CLUB DES SOMMELIERS - Banyuls (16% vol. )- 750ml,,10+ Sold,,$ 133.00,LAZUR GOURMET
3,Cradle Fresh - CLUB DES SOMMELIERS - Maury Rose Wine (16.5% vol.) -750ml,,,,$ 136.00,LAZUR GOURMET
4,Grace Cup - D197 Musang King Frozen Durian Pulp from Malaysia Pahang,200 g,100+ Sold,(3),$ 198.00,Mandarin Kitchen
5,Mix n Fresh - (日本)五月皇后薯仔--- 2KG家庭裝,,"2,000+ Sold",(57),$ 78.00,Mix n Fresh
6,Grace Cup - D24 Sultan King Frozen Durian Pulp Malaysia Pahang,200 g,100+ Sold,(2),$ 138.00,Mandarin Kitchen
7,Grace Cup - D175 Red Prawn Frozen Durian Pulp Malaysia Penang,200 g,100+ Sold,(1),$ 138.00,Mandarin Kitchen
8,Happy&HealthyFamily - Good Quality |Japanese-style |Dried Wakame Seaweed |Served in Soups|Salads,,700+ Sold,(11),$ 60.00,O2O-TMart
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 7 columns, instead of 3 in line 9.
,name,packing,sales,reviews,price,store_name
0,CookCookLand - Taiwan Handmade Frozen Tofu 300g(Frozen) #Hotpot #ShabuShabu #TaiwanWeek,300g,"8,000+ Sold",(106),$ 36.00,Cook Cook Land
1,Unionsum - Kudosha Abura- Age (145g) (3Pcs),,100+ Sold,(1),$ 28.00,Unionsum
2,GUGUSOY - Beancurd Puff (Keep refrigerated at 0 - 4 degree),150g x 2,"9,000+ Sold",(206),$ 20.50,GuGuSoy ToFu Dessert Workshop
3,PanDianMeiWei - Chinese Baked Bran 500g (Frozen),,"1,000+ Sold",(42),$ 79.00,Taste Of Home | Shanghai Food Expert
4,FoodWise - KYOTO BLACK BEAN NATTO 3P (45g x 3) (Frozen) (-18°C),,400+ Sold,(3),$ 36.00,FoodWise
5,Norway Express - 台灣百頁豆腐360g(Frozen),,"1,000+ Sold",(30),$ 38.00,Norway Salmon
6,Nattoku - Nattoku Natto Gokukotsubu mini 3 (40g x 3p) (Frozen) (-18°C),40gx3p,"2,000+ Sold",(32),$ 29.90,Global Deli
7,Vitasoy - Vitasoy SanSui Hi-Calcium Low Sugar Fresh Soya Milk 946ML(2Packs) (Chill),946gx2,"1,000+ Sold",(30),$ 33.00,VITASOY / VITA
8,GUGUSOY - Fresh Soymilk (Low Sugar) (Keep refrigerated at 0 - 4 degree),1 Litre x