Skip to content

Instantly share code, notes, and snippets.

View cheton's full-sized avatar
🎯

Cheton Wu cheton

🎯
View GitHub Profile
@cheton
cheton / distributed-mediasoup.js
Created August 5, 2022 04:34 — forked from gurupras/distributed-mediasoup.js
mediasoup horizontal scaling
onServerStartup () {
const { serverId, ip } = getServerInfo() // serverId does not change across restarts
this.serverId = serverId
// We don't have any routers or producers (yet). Clear any value that exists in the DB related to our serverId
clearSharedDB(serverId, 'routers')
clearSharedDB(serverId, 'producers')
// Update the DB with our serverId and ip so that others will know how to reach us
registerServerInDB(serverId, ip)
# GRBL Source (The standard GRBL firmware is identaical to the Inventables GRBL, just some minor config changes.)
https://github.com/gnea/grbl
Compiled with settings:
[Changes to (config.h)]
#define DEFAULTS_X_CARVE_1000MM
#define HOMING_FORCE_SET_ORIGIN // Enabled
#define ENABLE_M7 // Enabled
#define ENABLE_SAFETY_DOOR_INPUT_PIN // Enabled
@cheton
cheton / find-raspberry.sh
Created July 3, 2018 06:26 — forked from niun/find-raspberry.sh
Find Raspberry Pi in network (looking for MAC address vendor prefix of Raspberry Pi Foundation using nmap, awk for ipv4 / ping6, ip, grep for ipv6 neighbour discovery)
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'