Skip to content

Instantly share code, notes, and snippets.

View TheNoim's full-sized avatar
🏠
Working from home

Nils Bergmann TheNoim

🏠
Working from home
View GitHub Profile
@insidegui
insidegui / devicectl.sh
Created October 19, 2023 21:58
Helper functions for using devicectl to kill processes on connected iOS devices
# Add to your zsh profile
function devicepid() {
if [ -z "$1" ]; then
echo "Usage: devicepid <device-name> <search>"
echo "Example: devicepid 'iPhone 15 Pro Max' SpringBoard"
return 1
fi
if [ -z "$2" ]; then
@april
april / find-all-electron-versions.sh
Last active March 15, 2024 00:56
find all apps using Electron and their versions, on macOS systems
#!/usr/bin/env zsh
# patched versions for CVE-2023-4863: 22.3.24, 24.8.3, 25.8.1, 26.2.1
mdfind "kind:app" 2>/dev/null | sort -u | while read app;
do
filename="$app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
if [[ -f $filename ]]; then
echo "App Name: $(basename ${app})"
electronVersion=$(strings "$filename" | grep "Chrome/" | grep -i Electron | grep -v '%s' | sort -u | cut -f 3 -d '/')
@othyn
othyn / guide.md
Last active April 6, 2024 08:35
Fix horrendously bad macOS (12.3.1 tested) SMB (Samba) performance on Unraid

Intro

Out of the box, my SMB performance on macOS 12.3.1 would top out at around 20MB/s in short ~5 second bursts, which was absolutely horrendous, slow to navigate in Finder and slugish to interact with.

Since making these changes, I now get sustained ~80-100MB/s+ and instant Finder navigation which is superb and how things should be out-of-the-box (OOTB)!

May 2023 update: As of Ventura, the SMB issues were just horribly inconsistent and hard to maintain. Something in the combination of Unraid, macOS and SMB just doesn't play nice. I ended up binning NFS/SMB all together and heading to a locally hosted Nextcloud instance for file syncing, then using SFTP/Ansible Git flow for editing files within appdata.

Sources

@aleclarson
aleclarson / rollup-typescript.md
Last active April 7, 2024 14:13
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@fragtion
fragtion / fanspeeds.sh
Last active August 2, 2023 18:40
Dell R610 / R710 temperature-based fan speeds script
#!/bin/bash
# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed too high send the raw IPMI command to enable dynamic fan control.
#
# Also get CPU temps from lm-sensors and adjust fan speeds according to defined
# speed % which should be set according to your needs (each CPU model will vary)
#
# Requires:
@Quick104
Quick104 / readme.md
Last active March 21, 2024 23:27
Expose a server behind CG:NAT via Wireguard
@kez
kez / slugify.sql
Created May 13, 2019 14:50 — forked from ianks/slugify.sql
Generating Slugs in Postgres
CREATE EXTENSION IF NOT EXISTS "unaccent"
CREATE OR REPLACE FUNCTION slugify("value" TEXT)
RETURNS TEXT AS $$
-- removes accents (diacritic signs) from a given string --
WITH "unaccented" AS (
SELECT unaccent("value") AS "value"
),
-- lowercases the string
"lowercase" AS (
@dunklesToast
dunklesToast / README.md
Last active May 14, 2022 13:29
Dell R710 Scripts for changing fan speed

Dell PowerEdge R710 Fan Control

start the script like this:

./setTo2160.sh idrac ip idrac user - you will be prompted for the password!

./resetToNormal.sh idrac ip idrac user you will be prompted for the password!

@Obbut
Obbut / Adding a Physical Disk to Parallels.md
Last active January 23, 2024 08:06
Adding a second physical disk to Parallels

Adding a second physical disk to Parallels Desktop 14

I wanted my (NTFS) data disk to be accessible from my boot camp Parallels VM. Parallels provides no support for this, so I tried it myself.

I duplicated the disk file that Parallels created and started poking around, and after half an hour or so, had success. This is what you need to do.

My boot camp disk is at /dev/disk0. My data disk is at /dev/disk1.

These instructions are provided for educational use only and without guarantees. If you lose data because of this, blame yourself, and only follow them if you know what you are doing.

@t3easy
t3easy / .gitlab-ci.yml
Last active February 12, 2024 18:05
Build and deploy docker containers with GitLab CI
image: an-image-with-docker-and-docker-compose
variables:
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: ".docker"
before_script:
- mkdir -p $DOCKER_CERT_PATH
- echo "$DOCKER_CA" > $DOCKER_CERT_PATH/ca.pem
- echo "$DOCKER_CERT" > $DOCKER_CERT_PATH/cert.pem