git clone https://github.com/espressif/esp-idf -b v5.1 --depth=1 --recursive
cd esp-idf
./install.sh
source export.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
with serial.Serial("/dev/ttyUSB0", 9600, timeout=0.05) as ser: | |
buf = [0xc0, 0x00, 0x08, | |
0x03, 0xea, 0x84, 0x00, 0x0f, 0x03, 0x00, 0x00] | |
ser.write(bytes(buf)) | |
r = ser.read(11) | |
print(r) | |
buf = [0xc1, 0x00, 0x08] | |
ser.write(bytes(buf)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Flow | |
-- could replace following Just to pure (keep the first one?) | |
-- infix bind, boring! | |
-- https://www.youtube.com/watch?v=ZhuHCtR3xq8 | |
-- \a -> f a >>= \a -> g a | |
-- where f :: a -> M b | |
-- g :: b -> M c | |
-- when the type a = b = c | |
-- it could be seem as Monoid? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
namespace utils { | |
size_t sprintHex(char *out, size_t outSize, const uint8_t *bytes, size_t size) { | |
size_t i = 0; | |
// 2 hex chars + 1 null terminator | |
if (outSize < (size * 2 + 1)) { | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Mod_Priority,#Mod_Status,#Mod_Name | |
"0001","+","Creation Club: ccvsvsse004-beafarmer" | |
"0002","+","Creation Club: ccvsvsse003-necroarts" | |
"0003","+","Creation Club: ccvsvsse002-pets" | |
"0004","+","Creation Club: ccvsvsse001-winter" | |
"0005","+","Creation Club: cctwbsse001-puzzledungeon" | |
"0006","+","Creation Club: ccrmssse001-necrohouse" | |
"0007","+","Creation Club: ccqdrsse002-firewood" | |
"0008","+","Creation Club: ccpewsse002-armsofchaos" | |
"0009","+","Creation Club: ccmtysse002-ve" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Commented entries have reasonable defaults. | |
### Uncomment to edit them. | |
# Source: <source package name; defaults to package name> | |
Section: misc | |
Priority: optional | |
# Homepage: <enter URL here; no default> | |
Standards-Version: 1.0 | |
Package: libdrm2-dummy | |
# Version: <enter version here; defaults to 1.0> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update in 2023/06/19 | |
# 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself | |
# 2. Update frp from 0.33.0 to 0.49.0 | |
# 3. User=nobody is no longer suggested, use DynamicUser=yes instead | |
wget https://github.com/fatedier/frp/releases/download/v0.49.0/frp_0.49.0_linux_amd64.tar.gz --directory-prefix=/tmp | |
DIR=frp_0.49.0_linux_amd64 | |
tar -zxvf /tmp/$DIR.tar.gz -C /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <cstdint> | |
#include<format> | |
#include<chrono> | |
#include<concepts> | |
#include <ratio> | |
#include <type_traits> | |
#include<utility> | |
#include<iostream> |
Bandwith test with eGPU (thunderbolt 3)
$ nvidia-smi
Thu Jun 8 23:49:42 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.41.03 Driver Version: 530.41.03 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the real gcc instead of the apple clang | |
# brew install gcc | |
export CC=gcc-13 | |
export CXX=g++-13 | |
# brew uninstall binutils | |
# Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+ | |
# brew install gmp mpfr libmpc | |
JOBS=6 | |
# generate with | |
# chage the jobs to the number of your cpu cores |