Skip to content

Instantly share code, notes, and snippets.

View kreeger's full-sized avatar

Ben Kreeger kreeger

View GitHub Profile
<UserSettings>
<ApplicationIdentity version="10.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
<Categories>
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Saitek X52 HOTAS" MajorVersion="2" 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="" />
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Saitek X52, Logitech X3DPro" MajorVersion="2" 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 / switchdump.rb
Created July 30, 2017 16:35
Modifies Nintendo Switch screenshot EXIF and timestamp information and moves from SD card.
#!/usr/bin/env ruby
require 'fileutils'
require 'mini_exiftool'
if `which exiftool`.empty?
puts 'exiftool not found. Exiting.'
exit false
end
@kreeger
kreeger / Saitek X52, Logitech F310.1.8.binds
Created February 20, 2017 14:53
HOTAS + gamepad bindings for Elite: Dangerous.
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Saitek X52, Logitech F310" MajorVersion="1" MinorVersion="8">
<KeyboardLayout>en-US</KeyboardLayout>
<LockedDevice>{NoDevice}</LockedDevice>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
@kreeger
kreeger / Saitek X52, Logitech X3DPro.1.8.binds
Last active February 9, 2017 19:51
Dual-stick (plus throttle) controller bindings for Elite: Dangerous.
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Saitek X52, Logitech X3DPro" MajorVersion="1" MinorVersion="8">
<KeyboardLayout>en-US</KeyboardLayout>
<LockedDevice>{NoDevice}</LockedDevice>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
@kreeger
kreeger / Saitek X52 HOTAS.1.8.binds
Last active February 9, 2017 19:11
Elite: Dangerous bindings for my Saitek X52 HOTAS.
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Saitek X52 HOTAS" MajorVersion="1" MinorVersion="8">
<KeyboardLayout>en-US</KeyboardLayout>
<LockedDevice>{NoDevice}</LockedDevice>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
//
// CollectionIndexView.swift
// Created by Ben Kreeger on 9/26/16.
//
import UIKit
@objc(BDKCollectionIndexView)
class CollectionIndexView: UIControl {
enum Direction {
@kreeger
kreeger / fetch-pinned-cert.sh
Created May 19, 2016 16:13
# Fetches the latest certificate from a given domain and saves it as a DER-encoded certificate file in the destination of your choosing.
#!/bin/bash
# Fetches the latest certificate from a given domain and saves it as a
# DER-encoded certificate file in the destination of your choosing.
#
# Example:
# ./fetch-pinned-cert.sh ovenbits.com 443 /path/to/output/ovenbits.com.der
#
echo -n | openssl s_client -connect $1:$2 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/$1.cer