Skip to content

Instantly share code, notes, and snippets.

View Acrylic125's full-sized avatar
πŸ’œ
I may be slow to respond.

Acrylic125

πŸ’œ
I may be slow to respond.
View GitHub Profile
@Acrylic125
Acrylic125 / Notary Guide.md
Last active November 15, 2025 09:31
Signing Binary with Notary

Prerequisites

  • Have XCode installed (Check if xcrun is available).
  • Have an apple developer account.
  • MacOS.

Setup cert

First, register a cert into your keychain. You can follow Creating Certs.

  1. The type can either be Developer ID Application OR Developer ID Installer.
  2. Next If you do not have a certificate signing request (CSR) available, make one.
@Acrylic125
Acrylic125 / sample.tsx
Last active October 8, 2025 04:35
mapbox pin
const handleMapClick = (e: mapboxgl.MapMouseEvent) => {
if (map.getLayer(LAYER_RECOMMEND_PINS)) {
const features = map.queryRenderedFeatures(e.point, {
layers: [LAYER_RECOMMEND_PINS],
});
if (!(features === undefined || features?.length === 0)) {
const poiId = features?.[0]?.properties?.id;
if (poiId === undefined || typeof poiId !== "number") return;
mapStore.setViewingPOI({ type: "existing-poi", poiId });
mapStore.setCurrentSidePanelTab("place");
@Acrylic125
Acrylic125 / pyproject.toml
Created February 26, 2025 12:33
Python UV PyProject toml with pyright nvim
[tool.pyright]
exclude = [
".venv"
]
venvPath = "."
venv = ".venv"
reportUnusedCallResult = false
reportUnknownMemberType = false
@Acrylic125
Acrylic125 / Fuck Sourcekit.lua
Created February 26, 2025 01:43
Sourcekit made me do this fuckery.
local notification_messages = {}
vim.notify = function(msg, level, opts)
-- Store the message along with any level or option information
table.insert(notification_messages, {
message = msg,
level = level,
options = opts,
timestamp = os.time(),
})
@Acrylic125
Acrylic125 / gist:f5bfd9af224d6d37f8443d2f03b3b06c
Last active February 24, 2025 10:47
Simple ARM Muiltiplication
X_array DCD 0x1,0x0A,0x2,0xFFFFFFFC
Y_array DCD 0x8,0x2,0xFFFFFFFF,0xFFFFFFFF
;Y_array DCD 0x2,0x2,0x02,0x2
Z_Value FILL 4
MOV R0, #40 ;#0x00FF00
MOV R1, #-34 ; #0x00FF00
BL Mult
END
import os
import shutil
def find_node_modules(root_dir):
"""Recursively find all node_modules directories within the given root directory."""
for dirpath, dirnames, _ in os.walk(root_dir):
if 'node_modules' in dirnames:
yield os.path.join(dirpath, 'node_modules')
def confirm_and_remove(directories):
@Acrylic125
Acrylic125 / async-utils.ts
Last active May 20, 2024 11:47
Async queue processing with pending overrides
export class Lock {
private _lock = false;
private _queue: (() => void)[] = [];
public async acquire() {
if (!this._lock) {
this._lock = true;
return;
}
const promise = new Promise<void>((resolve) => {
@Acrylic125
Acrylic125 / react-virtualizer.tsx
Last active October 22, 2023 09:06
react-virtualizer.tsx
import { MainNavbar } from "@/components/main/main-navbar";
import { MainHead } from "@/components/main/main-head";
import {
List,
AutoSizer,
CellMeasurerCache,
CellMeasurer,
} from "react-virtualized";
import { type MeasuredCellParent } from "react-virtualized/dist/es/CellMeasurer";
import { type RefCallback } from "react";
# /var/www/html/load2.php
<?php
echo "<meta http-equiv=\"refresh\" content=\β€œ10,URL=/load2.php\" />";
$t = time();
echo "Load Test for t=$t - ";
$sum = $t;
for ($x = 0; $x <= 100000000; $x++) {
$sum += $x / rand();
}
%pip install numpy
%pip install matplotlib
%pip install pandas
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
input_cols = ['WindSpeed9am', 'Temp9am']
output_col = 'Rainfall'