Skip to content

Instantly share code, notes, and snippets.

View rixth's full-sized avatar

Thomas Rix rixth

View GitHub Profile
@rixth
rixth / mco1.cpp
Last active August 29, 2015 14:25
// Start the MCO outputing the main system clock
HAL_RCC_MCOConfig(RCC_MCO, RCC_MCO1SOURCE_SYSCLK, RCC_MCODIV_1);
// Enable GPIOB & TIM3 clocks
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_TIM3_CLK_ENABLE();
// Set up GPIOB1 (timer 3, channel 4) in alternate function (AF) mode
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Pin = GPIO_PIN_1;
const LONG_PRESS_MS = 400,
LONG_PRESS_TOLERANCE = 20,
NUDGE_MS = 400,
NUDGE_THRESHOLD = 20,
SWIPE_THRESHOLD = 70;
function Touchable() {
this.after('initialize', function () {
let touches = [],

Keybase proof

I hereby claim:

  • I am rixth on github.
  • I am rx (https://keybase.io/rx) on keybase.
  • I have a public key whose fingerprint is 9B8A CD4E 5785 8CD2 37EE 02FA C275 04E0 7119 F00D

To claim this, I am signing this object:

Oh this shiny new computer– –
There just isn’t nothin’ cuter.
It knows everything the world ever knew.
And with this great computer
‘Cause there ain’t a single thing that it can’t do.
It can sort and it can spell,
It can punctuate as well.
It can find and file and underline and type.
It can edit and select,
It can copy and correct,
@rixth
rixth / gist:5443497
Created April 23, 2013 13:22
WWDC ticket monitor
require 'pagerduty'
require 'nokogiri'
require 'open-uri'
URL_TO_MONITOR = 'https://developer.apple.com/wwdc/'
PAGERDUTY_SERVICE_KEY = 'xxx'
pagerduty = Pagerduty.new(PAGERDUTY_SERVICE_KEY)
previous_html = nil
#### Contents of the preconfiguration file (for &releasename;)
### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
#d-i console-setup/modelcode string pc105
d-i console-setup/layoutcode string us
@rixth
rixth / git-integrate.zsh
Created March 1, 2013 21:55
Usage: git-integrate base-branch <branches-to-merge>*
function git-integrate () {
integration_branch="integration_$RANDOM"
base_branch=$1
delete_integration_branch () {
echo "Checking back out to $base_branch"
git checkout $base_branch
echo "Deleting integration branch $integration_branch"
git branch -D $integration_branch
}
@rixth
rixth / function.zsh
Created December 11, 2012 05:13
A shell function to duplicate a VMWare Fusion 5 virtual machine, including renaming the innards.
function duplicate_vm() {
local from_name=$1
local to_name=$2
cp -r $from_name.vmwarevm $to_name.vmwarevm
pushd $to_name.vmwarevm > /dev/null
rm vmware*.log
mv $from_name.nvram $to_name.nvram

Logical Fallacies

Content reformatted from yourlogicalfallacyis.com.

ad hominem

Attacking your opponent's character or personal traits instead of engaging with their argument.

After Sally presents an eloquent and compelling case for a more equitable taxation system, Sam asks the audience whether we should believe anything from a woman who isn't married, was once arrested, and smells a bit weird.