Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 00:17
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

@NachoHumanNow
NachoHumanNow / nuvo
Created April 1, 2023 11:41
Nuvo Editor
https://github.com/novuhq/novu/blob/main/providers/netcore/package.json

So, You Want to be a Systems Engineer

Systems Engineering (also known as Infrastructure Engineering, Operations Engineering, or DevOps) is a challenging but rewarding career path. Because Systems Engineering draws from a wide variety of smaller topics, it can be hard to know where to start and in what order to begin. This resource is intended to give you a sketch of some of the learning-paths that that can lead you to a career in Systems Engineering.

What do I need to know?

To start, let's examine a high-level list of topics that established systems engineers should have knowledge of. In each of these topics, the level of depth required to get started as a systems engineer may vary, but it's good to have a general breadth of knowledge on all of these topics.

These lists are not exhaustive, rather a good starting point to gain general knowledge.

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 5, 2024 00:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@aike
aike / chorddetector.ksp
Created May 3, 2024 00:47
Chord detection KONTAKT script
{ Chord detection KONTAKT script by aike }
{ This program is licensed under MIT License. }
on init
set_ui_height_px(470)
set_ui_width_px(970)
make_perfview
set_script_title("main")
set_control_par_str($INST_WALLPAPER_ID, $CONTROL_PAR_PICTURE, "panel")
set_skin_offset(0)
@chenxiaolong
chenxiaolong / example.yaml
Created July 19, 2023 00:53
Custom Ansible module to manage the entire VyOS config
---
- hosts: vyos
vars:
# This would ideally go in the host vars.
vyos_config:
# ...
# The structure is identical to what `show configuration json pretty` in
# operational mode produces. For the vast majority of VyOS commands, the
# command <-> JSON translation is 1:1. For example, the command:
#
@vasanthk
vasanthk / System Design.md
Last active May 5, 2024 00:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mattiasgustavsson
mattiasgustavsson / main.c
Created March 5, 2024 19:18
Minimal code example for creating a window to plot pixels to
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <windows.h>
#pragma comment( lib, "user32.lib" )
#pragma comment( lib, "gdi32.lib" )
#define SCRW 640
#define SCRH 480
#!/usr/bin/python3
# This script built on top of the script by @rspeir on GitHub:
# https://github.com/krzmaz/pico-w-webserver-example/pull/1/files/4b3e78351dd236f213da9bebbb20df690d470476#diff-e675c4a367e382db6f9ba61833a58c62029d8c71c3156a9f238b612b69de279d
# this script looks for all the html file in /html_files directory, relative to current working directory
# if the filename contains "min" in the file name it will not try to minify it
# if there is a html or css file it will minify it
# if there is .noheader in the filename it will create a char[] containing the file. it will just be the data section nothing else
import os
@andelf
andelf / font.py
Created January 16, 2021 05:32
CJK Font for Rust embedded-graphics
from PIL import Image, ImageDraw, ImageFont
import PIL.features
# ! brew install libraqm
print('libraqm:', PIL.features.check('raqm'))
size = (320, 16)
"""
FORMAT = "RGB"