Skip to content

Instantly share code, notes, and snippets.

View al-skobelev's full-sized avatar

Alexander Skobelev al-skobelev

View GitHub Profile
@johndturn
johndturn / launchd-for-services.md
Last active April 20, 2025 04:56
Overview of using launchd to set up services on a macOS machine.

launchd - Script Management in macOS

What is it?

  • Used on macOS for managing agents and daemons and can be used to run scripts at specified intervals
    • macOS's competitor to cron, along with other things
  • Runs Daemons and Agents

What is a Daemon?

@Omar-Ikram
Omar-Ikram / EndpointSecurityDemo.m
Last active April 4, 2025 15:29
A demo of using Apple's EndpointSecurity framework - tested on macOS Monterey 12.2.1 (21D62)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - macOS Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - macOS Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - macOS Catalina 10.15 (19A583)
// Updated by Omar Ikram on 31/01/2021 - macOS Big Sur 11.1 (20C69)
// Updated by Omar Ikram on 07/05/2021 - macOS Big Sur 11.3.1 (20E241)
// Updated by Omar Ikram on 04/07/2021 - macOS Monterey 12 Beta 2 (21A5268h)
@isqad
isqad / bootstrap.s
Last active September 16, 2021 16:01
Bootstrap for stm32f103
@ stm32f103 has 0x5000 (20K) SRAM
@ SRAM is starting from 0x20000000
@ so stack is eq 0x20000000 + 0x5000 = 0x20005000
@ flash starts from 0x08000000
.syntax unified
.thumb
.cpu cortex-m3
@wojteklu
wojteklu / clean_code.md
Last active April 18, 2025 12:16
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

@ptrv
ptrv / lldb-gud-emacs-24.patch
Last active September 5, 2019 14:16
lldb-gud patch from llvm.org for emacs 24.4
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index e2d996f..d1458a2 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -34,7 +34,7 @@
;; and added a menu. Brian D. Carlstrom <[email protected]> combined the IRIX
;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
;; Derek L. Davies <[email protected]> added support for jdb (Java
-;; debugger.)
+;; debugger). llvm.org added support for lldb.
@burtonsamograd
burtonsamograd / save-lisp-tree-shake-and-die.lisp
Last active February 10, 2025 22:32
A quick and dirty tree shaker for SBCL, giving about a 40% reduction in dump size.
;; -*- mode: lisp -*-
;;
;; A quick and dirty tree shaker for SBCL. Basically, it destroys the
;; package system and does a gc before saving the lisp image. Gives
;; about a 40% reduction in image size on a basic hello world test.
;; Would like to hear how it works on larger projects.
;;
;; Original idea from: https://groups.google.com/d/msg/comp.lang.lisp/6zpZsWFFW18/WMy4PyA9B4kJ
;;
;; Burton Samograd
@shortsightedsid
shortsightedsid / cl-tcpip.lisp
Last active November 22, 2024 09:23
Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand. After spending a day trying, I finally came up with a small
; bit of code that makes it easy to understand the basics. I've written this
; primarily for myself, but should help others get started as well.
; As usual, we will use quicklisp to load usocket.
@RickCarlino
RickCarlino / gforth_cheat_sheet.md
Last active April 6, 2025 10:02
gforth cheat sheet

Math

  • .s - Show the stack
  • +, -, *, mod - Math operators
  • /mod - performs both / and mod

Stack manipulation

  • drop and 2drop - drop a stack item (once / twice)
  • dup - duplicate a stack item
  • rot - rotate the stack