Skip to content

Instantly share code, notes, and snippets.

View benburrill's full-sized avatar

Ben Burrill benburrill

  • Looking for a job
View GitHub Profile
#!/usr/bin/env bash
# Works around exes taking 10 seconds to start in the WSL if launched
# with a PWD that is in the linux filesystem.
old_pwd="$PWD"
# The <CommandParameters> seem to get concatenated together if you pass
# them to powershell, and I can't easily get proper escaping to work, so
# I'm just wrapping things in ' so it will at least you can have spaces.
@benburrill
benburrill / # binutils - 2020-07-28_01-40-54.txt
Created July 28, 2020 05:56
binutils on 3.10.0-957.12.1.el7.x86_64 - Homebrew build logs
Homebrew build logs for binutils on 3.10.0-957.12.1.el7.x86_64
Build date: 2020-07-28 01:40:54
@benburrill
benburrill / run
Last active May 17, 2020 01:00
OpenXcom nightly auto-update script
#!/usr/bin/env bash
# Runs and auto-updates OpenXcom nightlies in a portable environment
# By default, this script will try to download and use the latest
# nightly. If it finds a newer version than you already have, it will
# prompt you (with a zenity popup) to ask if you actually want to
# download it.
#
# If you want to stick to a particular version and don't want the popup
# telling you to update, you can change the $here/versions/greatest
# symlink to point to a specific AppImage rather than the default
@benburrill
benburrill / 99-custom-touchpad.conf
Last active September 2, 2018 20:02
I hate touchpad middle click
Section "InputClass"
Identifier "libinput touchpad custom"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
# Map the first two buttons (normally left click and middle click) to both be left click
# so that 2/3 of the touchpad is devoted to left click and 1/3 to right click.
# I'm not sure, but probably on a 2 button touchpad this would eliminate right click, so
# be aware.
@benburrill
benburrill / itdiff.py
Created January 4, 2018 10:33
Iterator diffing for /u/Skaperen
"""
Iterator diffing: a response to
https://www.reddit.com/r/learnpython/comments/7o0swm/interleaving_iterators/
MIT License:
Copyright (c) 2017 Ben Burrill
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

Keybase proof

I hereby claim:

  • I am benburrill on github.
  • I am benburrill (https://keybase.io/benburrill) on keybase.
  • I have a public key ASBfwFuMOM22ETCiolN6XZa1e2TlvHilKPjLQrvao8udWwo

To claim this, I am signing this object:

@benburrill
benburrill / life_expectancy_3.ipynb
Created July 20, 2016 19:54
life_expectancy_3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benburrill
benburrill / test.rst
Last active January 25, 2019 21:14
rst test

Hello!

There should be syntax-highlighed python below this line, right?

print("hi")
# Here we create a metaclass that effectively turns a class scope into a different programming environment where setting variables under one name saves them to another
# This level of madness requires Python 3 to run.
class CrazyDict(dict):
def __setitem__(self, item, value):
super().__setitem__("potato_" + str(item), value)
class CrazyMeta(type):
def __prepare__(*args, **kwargs):
return CrazyDict()
# Fill this out with your real username/password
USERNAME = "???"
PASSWORD = "???"