Skip to content

Instantly share code, notes, and snippets.

View kreeger's full-sized avatar

Ben Kreeger kreeger

View GitHub Profile
View update-creation-time.rb
#!/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/
View steam-big-picture-1080p.bat
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).
View Kreeger.3.0.binds
<?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).
View Kreeger.4.0.binds
<?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)
View kinto.py
# -*- 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.
View HTTPRecording.swift
//
// HTTPRecording.swift
//
import Foundation
struct HTTPRecording {
let statusCode: Int
let httpVersion: String
let headers: [String: String]
View cloudSettings
{"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.
View bootstrap-macOS.sh
#!/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
View 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 whose fingerprint is 65B5 0868 E045 FAEE E978 139E 876B 0A70 25B3 B62D

To claim this, I am signing this object:

@kreeger
kreeger / linux-bootstrap.sh
Last active January 26, 2019 17:20
Future machine setup. Run as root.
View linux-bootstrap.sh
# Update apt and such
apt update
apt upgrade -y
apt dist-upgrade -y
# Add apt keys
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | apt-key add -
wget -q https://download.sublimetext.com/sublimehq-pub.gpg -O- | apt-key add -