Skip to content

Instantly share code, notes, and snippets.

View oliora's full-sized avatar

Andrey Upadyshev oliora

View GitHub Profile
@CodeBradley
CodeBradley / omv7-cm3588-zfs.md
Last active March 25, 2026 19:14
How to Setup Open Media Vault (OMV) 7 on FriendlyElec CM3588 Nas Kit with ZFS

How to Setup Open Media Vault (OMV) 7 on FriendlyElec CM3588 Nas Kit with ZFS

The FriendlyElec (NanoPC) CM3588 is a RK3588 based solution with 4/8/16GB LPDDR4x memory and 0/64GB eMMC flash storage. The inital carrier board released with the CM3588 features 4x M.2 NVMe SSD slots (PCIe 3.0 x1 each) and a 2.5gbps RJ45 port, making it an attractive option for a low powered silent NAS at $130/$145/$174 depending on which RAM configuration you purchase.

I ordered this in response to the LTT video. I have seen a few people struggling to configure these, and figured I would offer some basic guides in order to get those who need some assistance on getting their NAS up and going.

I will be using the precompiled Debian 12 installer found [here.](https://drive.google.com/drive/folders/1FoBbP_nPkMehwBj4wH

@Lauszus
Lauszus / crc.py
Last active December 12, 2024 21:06
Generic CRC-8, CRC-16 and CRC-32 calculations in Python
#!/usr/bin/env python
# Inspired by: https://www.youtube.com/watch?v=izG7qT0EpBw
# The CRC values are verified using: https://crccalc.com/
def reflect_data(x, width):
# See: https://stackoverflow.com/a/20918545
if width == 8:
x = ((x & 0x55) << 1) | ((x & 0xAA) >> 1)
x = ((x & 0x33) << 2) | ((x & 0xCC) >> 2)
x = ((x & 0x0F) << 4) | ((x & 0xF0) >> 4)
@wyllie
wyllie / parse_ini.sh
Created July 22, 2018 17:04
Parse aws credentials file in bash
#!/usr/bin/env bash
INI_FILE=~/.aws/credentials
while IFS=' = ' read key value
do
if [[ $key == \[*] ]]; then
section=$key
elif [[ $value ]] && [[ $section == '[default]' ]]; then
if [[ $key == 'aws_access_key_id' ]]; then
@newlawrence
newlawrence / join.cpp
Last active July 12, 2018 21:57
Performant C++17 implementation of Python's join function
#include <string_view>
#include <string>
#include <tuple>
class Joint {
std::string _j;
auto& _concat(std::string& s, std::string_view sv) { return s += sv; }
template<typename... Args>
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active March 23, 2026 22:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@jkuruzovich
jkuruzovich / fbme.py
Created February 3, 2017 18:28 — forked from espeed/fbme.py
Facebook Graph API Example in Python
# Facebook Graph API Example in Python
# by James Thornton, http://jamesthornton.com
# Facebook API Docs
# https://developers.facebook.com/docs/graph-api/using-graph-api#reading
# Get Your Facebook Access Token Here...
# https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me
# Before running this script...
@wojteklu
wojteklu / clean_code.md
Last active April 9, 2026 23:28
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules