Skip to content

Instantly share code, notes, and snippets.

@gizmaa
gizmaa / Plot_Examples.md
Last active May 8, 2024 13:38
Various Julia plotting examples using PyPlot
@Derpidoo
Derpidoo / led_strip_controller_44button_remote_protocol.txt
Last active May 8, 2024 13:37
RGB LED Strip Controller 44 Button IR Remote Codes
RGB LED Strip Controller w/44 Button IR Remote Protocol
E.g. https://www.amazon.com/Flexible-Changing-Non-Waterproof-Controller-Included/dp/B01EWBZW0A/
"Hue hue hue" -you, after saving hundreds on your smart lighting
IR Wavelength: 940nm
Code Type: NEC
Code Length: 32 bit
## Function Code
===.====================.=======
@aphyr
aphyr / minikanren.pl
Created October 12, 2020 22:10
Minikanren in Lisp in Prolog
:- use_module(library(pairs)).
:- use_module(library(reif)).
not_in_list(K, L) :-
if_((L = []),
true,
([X | More] = L,
dif(K, X),
not_in_list(K, More))).
@mbinna
mbinna / effective_modern_cmake.md
Last active May 8, 2024 13:34
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@axzxc1236
axzxc1236 / USB_ZFS_auto_mount.MD
Last active May 8, 2024 13:33
How to mount ZFS pools thats on USB drives automatically.

I know there are a lot of tutorials on mounting ZFS automatically already, but that didn't work for me.

My situation:
I have a USB DAS(Direct-Attached Storage) that is connected to my NAS.

Why didn't the tutorials on the internet worked for me:
Systemd service files that comes with ZFS won't wait for USB devices.

Solution:
Create a service that can wait for my DAS to be recognized by Linux and then mount my ZFS pool.

Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
@NSWG
NSWG / VMware Workstation 16 Pro and Player keys
Last active May 8, 2024 13:33
VMware Workstation 16 Pro and Player keys
VMware Workstation Pro 16.x Serials
YA7RA-F6Y46-H889Z-LZMXZ-WF8UA
ZV7HR-4YX17-M80EP-JDMQG-PF0RF
UC3XK-8DD1J-089NP-MYPXT-QGU80
GV100-84W16-M85JP-WXZ7E-ZP2R6
YF5X2-8MW91-4888Y-DNWGC-W68TF
AY1XK-0NG5P-0855Y-K6ZXG-YK0T4
VMware Workstation Player 16.x Serials
@mecid
mecid / Calendar.swift
Last active May 8, 2024 13:30
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)
@heroheman
heroheman / ranger-cheatsheet.md
Last active May 8, 2024 13:29
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts

Removing a Mac's Firmware Password By Reflashing EFI ROM

According to Apple, the only way to remove an unknown firmware password from a MacBook (2011 and later) is to take it to the Apple Store with the original proof-of-purchase. However, I've found that there is another way, which I've been successful with for the unibody MacBook Pro--it's essentially just modifying a couple bytes in the EFI ROM, which should be simple. What's not simple, however, is figuring out how to read and write to the EFI chip. In this post, I'll talk about the process that I figured out and what worked for me.

The Official Method

Apple's method of resetting the firmware password is not reproducible, as Apple generates an SCBO file that unlocks the EFI using their private key. You can read more about this process here. The problem with this system is that, if you are in the unfortunate situation of neither having the firmware unlock pass