Skip to content

Instantly share code, notes, and snippets.

View kreeger's full-sized avatar

Ben Kreeger kreeger

View GitHub Profile
@kreeger
kreeger / keybase.md
Created April 12, 2024 21:10
keybase.md

Keybase proof

I hereby claim:

  • I am kreeger on github.
  • I am kreeger (https://keybase.io/kreeger) on keybase.
  • I have a public key ASBxFCo94gRaq0JkZxTj8gP3oDU_9-olK3p0qhwO9hogIwo

To claim this, I am signing this object:

@kreeger
kreeger / 000-steam-retroarch-on-deck.md
Last active December 19, 2023 18:51
Finds latest version of Steam Linux Runtime (sniper) and uses its library path to help run RetroArch, installed via Steam.

Running Steam-installed RetroArch on a Steam Deck

Script overview

This script lets you run Steam-installed RetroArch with command line arguments on a Linux-based system and lets you create separate Steam entries for each ROM, with a command like so (something like this should be in the "target" field):

"/path/to/where/Steam/installs/RetroArch/retroarch.sh" \
#!/usr/bin/env ruby
glob = ARGV[0] || '*.*'
Dir[glob].each do |f|
time = File.mtime(f)
File.utime(time, time, f)
end
@kreeger
kreeger / steam-big-picture-1080p.bat
Last active April 23, 2021 03:16
Two batch scripts for launching Steam in a specific resolution for streaming to a TV or iPad -- necessary to get the aspect ratio right if your primary PC display is not 16:9 or 16:10. Requires https://tools.taubenkorb.at/change-screen-resolution/
C:\Applications\ChangeScreenResolution.exe /w=1920 /h=1080 /d=0
"C:\Program Files (x86)\Steam\steam.exe" -start "steam://open/bigpicture"
TIMEOUT /T 3
C:\Applications\ChangeScreenResolution.exe /w=3440 /h=1440 /d=0
@kreeger
kreeger / Kreeger.3.0.binds
Created April 19, 2021 19:12
Elite Dangerous: Horizons keybinds (as of the Fleet Carrier update).
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Kreeger" MajorVersion="3" MinorVersion="0">
<KeyboardLayout>en-US</KeyboardLayout>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@kreeger
kreeger / Kreeger.4.0.binds
Last active April 19, 2021 19:11
Elite Dangerous: Odyssey keybinds (as of Alpha 3).
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Kreeger" MajorVersion="4" MinorVersion="0">
<KeyboardLayout>en-US</KeyboardLayout>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@kreeger
kreeger / kinto.py
Created August 2, 2020 02:47
My configuration for https://github.com/rbreaves/kinto (the default seems to switch Alt and Super/Cmd)
# -*- coding: utf-8 -*-
import re
from xkeysnail.transform import *
# Use the following for testing terminal keymaps
# terminals = [ "", ... ]
# xbindkeys -mk
terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","sakura","guake","tilda","xterm","eterm","kitty","alacritty","mate-terminal","tilix","xfce4-terminal"]
terminals = [term.casefold() for term in terminals]
@kreeger
kreeger / HTTPRecording.swift
Created December 27, 2019 02:14
A convenient way to mock out URL requests in Swift tests.
//
// HTTPRecording.swift
//
import Foundation
struct HTTPRecording {
let statusCode: Int
let httpVersion: String
let headers: [String: String]
{"lastUpload":"2020-12-06T16:53:14.349Z","extensionVersion":"v3.4.3"}
@kreeger
kreeger / bootstrap-macOS.sh
Last active June 1, 2023 16:51
A script for bootstrapping a new Mac.
#!/usr/bin/env bash
#
# bootstrap-macOS.sh
# Install Xcode, make sure Mackup's files are downloaded, and then run this script.
#
# Install Xcode command line tools.
sudo xcode-select --install