Skip to content

Instantly share code, notes, and snippets.

View sgloutnikov's full-sized avatar

Stefan Gloutnikov sgloutnikov

View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active January 22, 2026 17:44
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

@vasanthk
vasanthk / System Design.md
Last active January 22, 2026 16:07
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?
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active January 21, 2026 23:19
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@liviaerxin
liviaerxin / README.md
Last active January 21, 2026 02:47
FastAPI and Uvicorn Logging #python #fastapi #uvicorn #logging

FastAPI and Uvicorn Logging

When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.

Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.

Before overriding:

uvicorn main:app --reload
@yovko
yovko / arch_linux_install_notes.md
Last active January 20, 2026 22:13
Arch Linux installation (BTRFS+LUKS2+Limine)
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active January 20, 2026 18:03
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@stefanstranger
stefanstranger / mitmproxycertinstall.md
Last active January 2, 2026 20:34
# How to install mitmproxy certificate as root CA steps:

How to install mitmproxy certificate as root CA steps:

  1. Create a Android Virtual Device (AVD) using a non Google image to enable root access

  2. Start mitmproxy

  3. Install DuckDuckGo browser via downloaded apk on AVD

    Download via: https://apkcombo.com/duckduckgo/com.duckduckgo.mobile.android/

  4. Start ADV emulator with mitmproxy configured:

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active December 18, 2025 05:55
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AvasDream
AvasDream / oscp_prep.md
Last active December 17, 2025 22:39
Resource for OSCP like HTB Boxes with Ippsec Videos and Writeups.
@ozh
ozh / new empty git branch.md
Last active November 8, 2025 03:05
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.