This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Alacritty from https://alacritty.org/ and then copy the contents of this | |
# gist into ~/.alacritty.toml | |
# | |
# You can clone the Alacritty themes from https://github.com/alacritty/alacritty-theme | |
# and install Fira Code from https://github.com/tonsky/FiraCode | |
# | |
# Installing TLDR, the simplified-manual project - https://tldr.sh/ - has also been | |
# useful for me. | |
# | |
# You need to specify where you've cloned the themes repo in the first "include" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist describes the process of making a self-hosted installation | |
of Wordpress run with SQLite as a backing store, rather than MySQL. | |
This is not a step-by-step guide, and will require some degree of | |
comfort with your filesystem, editors, and logging. This involves | |
both fighting with and lying to these systems, and consequently | |
comes with no guarantees whatsoever. | |
--------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you, like me, have all of your various source-code-like projects in ~/src/ | |
# this is how to give yourself per-project shell history. | |
# | |
# I wish I'd done this years ago. | |
# | |
# First, in your .bashrc file, you redefine the cd, pushd and popd builtins to be "do the builtin bit, | |
# then do one other thing (set_src_history.sh, below) like so: | |
cd () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fakeResponse(req): | |
""" Replacing httplib2 with Requests without rewriting the planet (har har) | |
means that we need to assemble a fake Response object out of the header set | |
returned by a Request. Shenanigans ahead. """ | |
import httplib2 | |
info = dict() | |
info['status'] = 200 | |
fake = httplib2.Response(info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This AutoHotKey script remaps single- and double-click actions | |
; of your Surface Pen to PageUp and PageDown respectively, while | |
; you're using Firefox or Chrome. This will let you use the pen | |
; as a presenter's controller while you're showing slideshows | |
; from Google Docs. | |
; AHK syntax is pretty weird, but if you've got questions | |
; or ideas for improvement, email me at [email protected] | |
#If WinActive("ahk_exe chrome.exe") || WinActive("ahk_exe firefox.exe") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This is a four-part process, and it's awful, and I'm sorry. I'd have | |
# automated more of it, but the interstitials we've put on the etherpads | |
# have foiled my efforts there and I wanted to get this out fast. | |
# | |
# This will give you: | |
# - A folder full of all your team pads in their current state | |
# in text form, and | |
# - A single zipped file of containing all of them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist solves the problem of iTunes being activated whenever you turn off your | |
# bluetooth headset or speakers. | |
# | |
# You need to open a terminal app, either retype or paste in the following two lines: | |
# This will probably make your Apple Remote stop working, and definitely makes the media | |
# buttons on your keyboard stop working. Breaking one piece of OSX to make some other | |
# piece of OSX work right is apparently where we are now. | |
launchctl stop com.apple.rcd | |
launchctl unload /System/Library/LaunchAgents/com.apple.rcd.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python's pygit2 does not work correctly in a virtualenv for reasons I have not explored. | |
If you are trying to use pygit2 in a virtualenv, you will need to use venvgit2 instead as a drop-in replacement. | |
Using that, you can "include pygit2" as usual. However, you will need to first: | |
apt-get install cmake gcc-5 libffi-dev | |
And then: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv)mhoye:~/src/github-mozilla > pip install venvgit2 2>&1 | tee output.file | |
Collecting venvgit2 | |
Using cached venvgit2-0.22.1.tar.gz | |
Requirement already satisfied (use --upgrade to upgrade): cffi>=0.8.6 in ./venv/lib/python2.7/site-packages (from venvgit2) | |
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./venv/lib/python2.7/site-packages (from cffi>=0.8.6->venvgit2) | |
Building wheels for collected packages: venvgit2 | |
Running setup.py bdist_wheel for venvgit2 | |
Complete output from command /Users/mhoye/src/github-mozilla/venv/bin/python -c "import setuptools;__file__='/private/var/folders/h2/mtm76lds00lcdyyfbvspthvh0000gn/T/pip-build-Eg7MXK/venvgit2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/h2/mtm76lds00lcdyyfbvspthvh0000gn/T/tmpp4hn5vpip-wheel-: | |
running bdist_wheel | |
running build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change bluetooth audio parameters on OSX to solve dropping/choppy audio problems on Yosemite | |
# (and earlier, reportedly) w/ BT headphones. This is not a perfect solution, but reduces | |
# the number of interruptions dramatically. It has been tested on exactly one machine with | |
# iTunes local audio only; please leave a comment if you discover it causes any problems with AirPlay | |
# or other software. | |
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48 | |
defaults write com.apple.BluetoothAudioAgent "Stream - Max Outstanding Packets (editable)" 10 | |
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" 0 |
NewerOlder