Skip to content

Instantly share code, notes, and snippets.

View coderobe's full-sized avatar
🎩
i know a thing or two about a thing or two

Mara Robin B. coderobe

🎩
i know a thing or two about a thing or two
View GitHub Profile
@sgentle
sgentle / launchoptionsmac.md
Created August 2, 2026 23:25
Setting environment variables and injecting libraries using Steam launch options on Mac

A working launch options example from me messing around with RED4ext on Cyberpunk for Mac:

/bin/sh -c "open --env DYLD_INSERT_LIBRARIES=\"$STEAM_DYLD_INSERT_LIBRARIES:@executable_path/../../../red4ext/RED4ext.dylib:@executable_path/../../../red4ext/FridaGadget.dylib\" --env DYLD_FORCE_FLAT_NAMESPACE=1 -nW %command% --args -fullscreen"

Which is roughly equivalent to what you would expect from writing: DYLD_INSERT_LIBRARIES=red4ext/RED4ext.dylib:red4ext/FridaGadget.dylib %command% -fullscreen (which definitely does not work)

Here's a breakdown of all the incantations:

  • The first argument has to be a full path to an executable, so we use /bin/sh and pass everything else as one big string with -c
  • %command% is automatically enclosed in single quotes ('), so the string we pass to -c has to be in double quotes ("), and any double quotes inside it have to be escaped (\")
@spenserhale
spenserhale / git-batch-push.sh
Last active August 3, 2026 15:28
When your repo exceeds upload limit (GitHub 2GB), you can push in batches so you can store up to total size limit. (100GB) (Warning uses force push, ideally should be used for setting up new remote, once)
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=250
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@jakevdp
jakevdp / PythonCpp.ipynb
Last active January 8, 2020 03:44
Hack to make Python look like C++
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Earnestly
Earnestly / makepkg_overview.rst
Last active October 13, 2025 00:41
A brief overview of the process involved in creating a pacman package.

A Brief Tour of the Makepkg Process: What Makes a Pacman Package

Introduction

This is a terse document covering the anatomy of a package built for the pacman package manager.

The following example commands can mostly run verbatim to manually create a

#!/usr/bin/env ruby
require "twitter"
# Twitter client configuration
client = Twitter::REST::Client.new do |config|
config.consumer_key = YOUR_KEYS_HERE
config.consumer_secret = YOUR_KEYS_HERE
config.access_token = YOUR_KEYS_HERE
config.access_token_secret = YOUR_KEYS_HERE
end
@taviso
taviso / rebinder.c
Created November 12, 2013 16:34
Simple rebinding nameserver.
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <time.h>