Skip to content

Instantly share code, notes, and snippets.

View jonathanweinberg's full-sized avatar

Jonathan Weinberg jonathanweinberg

View GitHub Profile
@wheremyfoodat
wheremyfoodat / post.md
Last active June 3, 2024 07:44
Why having multiple emulators is good

Forenote: Most of the following is simply my point of view as an emulator developer. Various names are omitted for privacy reasons.

I usually write blog posts aimed at developers, but I'd like to make an exception just this once. For a lot of game consoles you have likely noticed that there's multiple emulators for said console. Even for more modern systems like the Nintendo 3DS, you've got several active emulators such as Citra, Mikage and Panda3DS, and some less active ones at the moment such as Corgi3DS. This has made many people in the emulation community ask "Why do emulator developers not simply collaborate"? Thus, I'd like to dedicate this post to answering this question as an emulator developer myself.

1) We actually do collaborate!

Even when we're working on different emulators, we very often collaborate and help each other. A lot of people don't know, since it usually happens ov

sudo scutil --set ComputerName $HOSTNAME
sudo scutil --set HostName $HOSTNAME
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
mkdir -p "${HOME}/Pictures/Screenshots"
defaults write com.apple.screencapture "location" -string "${HOME}/Picures/Screenshots"
defaults write com.apple.screencapture "type" -string "png"
@kconner
kconner / macOS Internals.md
Last active September 12, 2024 02:10
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@stefanschmidt
stefanschmidt / download_all_tweets.go
Created November 26, 2022 17:02
Download all tweets of a user without requiring an API key
// To my knowledge the only solution available that:
// - does not require an API key with "elevated access" (most other solutions need this, requires an application)
// - does not require an API key with "essential access" (requires a valid cell phone number to enable)
// - does not require any type of API key
// - isn't outdated or otherwise broken
//
// Can (probably) download up to 3200 tweets
//
// brew install go
// go run download_all_tweets.go
@othyn
othyn / guide.md
Last active September 20, 2024 03:03
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

@timsutton
timsutton / modify_screensharing.sh
Last active July 26, 2024 20:58
Enabling screen sharing on macOS Monterey as of 12.1 beta 2
#!/bin/bash
# A cleaner alternative to this approach, but which requires a restart, is to populate TCC's SiteOverrides.plist inside
# the TCC app support directory with the following:
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
# <key>Services</key>
# <dict>
// ==UserScript==
// @name ZZZZOTAC "Add to cart"
// @namespace http://tampermonkey.net/
// @version 0.0.1
// @description Waits for a Zotac drop.. and adds to cart, from the product page, or from the product listing page (e.g. search, or category)
// @author Falcodrin Community - Mentalow#7935
// @match https://www.zotacstore.com/us/*
// @run-at document-start
// @grant GM.xmlHttpRequest
// @connect events.pagerduty.com
@maelvls
maelvls / README.md
Last active July 9, 2022 13:25
Stuff about Synology OS. Moved to https://hackmd.io/8bZlqm9sQh6b0HH7Jr2YzA
var fs = require('fs');
function readJsonFile(fileName) {
var buf = fs.readFileSync(fileName);
return JSON.parse(buf.toString('utf8'));
}
var deviceRegistry = readJsonFile('./.storage/core.device_registry')
var devices = deviceRegistry.data.devices;
var smokeDetectors = {};
for (var device of devices) {
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active September 17, 2024 17:34
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').