• 4 Posts
  • 228 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle


  • I use Code OSS with clangd and the nvim extension (because Microsoft disabled their c/c++ tools) because i want access to the nrfconnect extension pack as a beginner. I don’t have to go searching in the documentation and compiling, then recompiling 10 times to self-discover the required devicetree parameters and figure out what drivers are available vs mainline zephyr.

    Plus the debug interface works well.

    For everything else possible it is vim/neovim, but I haven’t been able to find good neovim setup for nrfconnect.


  • No, ssds have a ton of wear leveling where data is shifted around and not deleted. Deleting data wears out the SSD, so it is held as much as possible with the controller. SSDs are like 10% bigger than advertised just to prolong the life.

    Even if you write the whole thing with random data then zeros, it will still have blocks in unaccessible (to normal users) places that contain old data.

    Always best to use disk encryption or keep any sensitive data in filesystem encryption like plasma vaults or fscrypt.



  • I am doing something similar. I use OIDC for everything possible.

    Authelia is quite picky about everything being correctly populated, but if I remember right, the documentation doesn’t do a great job of explaining different variables for someone outside of the security industry (similar with traefik). I found a good tutorial via search that got all of the defaults set up, then playing with the options to my liking and now it is just copy pasting the condiguration per app that I want to enable, generating an key and hashing it.

    If you want, I can sanitize my config and share it?


  • Hmmm, I used littlefs for SD card writing at work with an STM32F0 chip. It was hell working with files when tons of essential functions like appending and seeking simply didn’t work in the STM HAL… Plus dealing with opening and closing files and appending files and having to seek in them to find what you want, parsing results, cleaning old files, etc… compared to simple circular buffer and a start and end address of relevant data that can be erased once every day or week depending on use. Even with a daily erase of the NOR chip, they are rated for 100k program/erase cycles which would be over 250 years before degradation starts. I am not dealing with a ton of data nor the flexibility of a full UI/ app storage where I would definitely just use littlefs.


  • Thanks for taking a look!

    Intuitively for me, steps + bpm should be next to each other because the compiler will use bpm as the padding for the 24 bit steps. I intentionally did it that way. At least when I checked the memory addresses when testing it that was the case (there was no padding added). Wouldn’t it be potentially more problematic to have a bit field with a weird bit number, 24, followed by a 16 bit member that can’t be “fit” into the 32 bits that the compiler wants to assign? or is that not how it works.

    I’m not quite sure what you mean by your last point. The flow would go: acquire data -> add to structure -> fill up a page worth of data (or a sector) -> write to memory. Then pulling it out would be: read from memory -> put in structure -> process -> send data via bluetooth. If I change the layout of anything, that would require a reflash of the MCU and previous data would already have been transferred over bluetooth (assuming end-user OTA flashing or just being in a vicinity of a phone and not out and about where memory saving is necessary) and would no longer be needed to be stored/pulled from memory. Or is there another case that I am totally missing?



  • Really depends on what you consider grinding.

    Pretty much all MMOs or PVEs have you grinding for gear (helldivers 2 I don’t feel is grindy in comparison, but some do)

    Survival games like ark, valheim, etc… Have you grinding for bases and the next section of the game

    Pretty much all PvP games (CS2, valorant, apex, starcraft, Rocket league, etc…) have you grinding out muscle memory skills

    The antithesis to these are instance-based games where at max you grind aesthetic gimmicks, but in single player games they don’t have those like REPO where you always reset and fall guys where it is minigame based

    The problem with these games is since you don’t have a “reward for work” (grinding), people get bored of them.








  • Ugh I hate excel. It can’t do the most basic things like search and replace things reliably in all cases. I have moved literally all data analysis besides the absolute basic “count” and “sum” operations to python in spyder. 200x faster, repeatable, won’t freeze up with large datssetd, and has never once failed a basic operation like a search and replace. Not to mention the localization issues and the fact that it will fuck things up completely if you install a new printer because Microsoft decided the printer has priority of your document and spreadsheet layouts over choosing a default.

    I had some evaluation board software that whenever the value dipped below -1, would place the comma completely randomly in the floating point number.

    Excel almost had a heart attack when I asked it to search and replace ”-1” with “-1,” and it found all of the cases just fine, but decides to ignore the replace and not place a comma at all. If I tried to convert them to a number, it freaked out and placed the decimal place also randomly, different than the input. And of course trying to do in-place operations on a column for export is just painful.

    Hell, in notepad++ I could just regex the digit range that was preceded by a ”-1” and get everything replaced using a few brackets.

    Not to mention how terrible the graphs work in comparison and how bad they look with the default options 😅. But hey, you can automatically put in a drop shadow or frame it in a useless way.

    There are some people who can work very efficiently and do some crazy things in excel (like the excel doom) but unless you have literally been using it daily for many years and actively looking for ways to speed up, then it is just as easy or easier to do things in an actual data processing program like matlab, octave, python, or R (And I am not a coder) and you can literally copy paste a file name for the next full dataset.




  • Dropping instead of blocking might technically be better because it wastes a bit more bot time and they see it as “it doesn’t exist” rather than an obsticle to try exploits on. Not sure if that is true though.

    For me:

    • ssh server only with keys

    • absolutely no ssh forwarding, only available to local network via firewall rules

    • docker socket proxy for everything that needs socket access

    • drop non-used ports, limit IPs for local-only services (e.g. paperless)

    • crowdsec on traefik for the rest (sadly it blocks my VPN IPs also)

    • Authelia over everything that doesn’t break the native apps (jellyfin and home assistant are the two that it breaks so far, and HA was very intermittent so I made a separate authelia rule and mobile DNS entry for slightly reduced rules)

    • proper umask rules on all docker directories (or as much as possible)

    • main drive FDE with a separate boot drive with FDE keyfile on a dongle that is removed except for updates and booting to make snatch-and-grabs useless and compromising bootloader impractical

    • full disk encryption with passworded data drives, so even if a smash and grab happens when I leave the dongle in, the sensitive data is still encrypted and the keys aren’t in memory (makes a startup script with a password needed, so no automated startups for me)

    For more info, I followed a lot of stuff on: https://github.com/imthenachoman/How-To-Secure-A-Linux-Server