Skip to content

Instantly share code, notes, and snippets.

View HieuPham2000's full-sized avatar
🎯
Focusing

Hieu Pham (Alex Pham) HieuPham2000

🎯
Focusing
  • Hanoi University of Science and Technology
  • Hanoi
  • 00:46 (UTC +07:00)
  • LinkedIn in/pthieu1
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active October 22, 2025 07:38
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

@radames
radames / opencv_video_to_pygame.py
Last active April 17, 2023 15:34
OpenCV VideoCapture running on PyGame - repo ref https://github.com/radames/opencv_video_to_pygame
from pygame.locals import KEYDOWN, K_ESCAPE, K_q
import pygame
import cv2
import sys
camera = cv2.VideoCapture(1)
pygame.init()
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280, 720])
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active October 20, 2025 14:01
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@itarato
itarato / encryption.java
Created September 28, 2014 18:59
Java AES CBC encryption example
package com.company;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest;
import java.security.SecureRandom;
public class Main {