Skip to content

Instantly share code, notes, and snippets.

View AnthonyZJiang's full-sized avatar
🎓
Busy building robots 🤖

Anthony Jiang AnthonyZJiang

🎓
Busy building robots 🤖
View GitHub Profile
@JavaScriptDude
JavaScriptDude / SingleInstanceChecker.py
Last active July 27, 2024 11:18
Cross Platform Example of Single Instance Checking in Python
import time, sys, os
class SingleInstanceChecker:
def __init__(self, id):
if isWin():
ensure_win32api()
self.mutexname = id
self.lock = win32event.CreateMutex(None, False, self.mutexname)
self.running = (win32api.GetLastError() == winerror.ERROR_ALREADY_EXISTS)
@westphallm1
westphallm1 / Spinnaker_on_RPi_Ubuntu.md
Last active June 17, 2025 10:59
Installing the Spinnaker SDK on Ubuntu for Raspberry Pi

Raspberry Pi Ubuntu Spinnaker SDK Setup

These steps describe using an Ubuntu desktop environment to install Ubuntu and the Spinnaker Python interface on a Raspberry Pi 3 B+. Commands to be run on the desktop are prefaced with (desktop)$, and commands to be run on the Raspberry Pi are prefaced with (pi)$

  1. Flash the latest Ubuntu image (at the time of writing: 18.04) to an SD card and perform first-time setup by following these instructions. You will need an HDMI cable, a monitor, and a keyboard. The Raspberry Pi must also be connected to your local network via Ethernet.
@wojteklu
wojteklu / clean_code.md
Last active July 24, 2025 23:24
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