Skip to content

Instantly share code, notes, and snippets.

View mmitchel's full-sized avatar

Michael Mitchell mmitchel

View GitHub Profile
@jdneo
jdneo / timerInterrupt.ino
Created December 8, 2016 02:21
Timer Interrupt example for Adafruit Feather M0. Callback function can be written in TC3_Handler().
#define LED_PIN 13
#define CPU_HZ 48000000
#define TIMER_PRESCALER_DIV 1024
void startTimer(int frequencyHz);
void setTimerFrequency(int frequencyHz);
void TC3_Handler();
bool isLEDOn = false;
@encounter
encounter / 0-README
Last active July 7, 2023 04:50
Xbox 360 Wireless Controllers xboxdrv/systemd/udev rules
This is configuration for the Xbox 360 Wireless Gaming Receiver to support hotplugging with xboxdrv.
By default, it enables 4 controllers and doesn't require the xpad module to be blacklisted.
File locations:
/usr/lib/systemd/system/xboxdrv.service
/etc/udev/rules.d/99-xboxdrv.rules
To activate:
sudo systemctl disable xboxdrv
sudo systemctl stop xboxdrv
@albertbori
albertbori / Installation.md
Last active June 11, 2024 14:09
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@fenrir-naru
fenrir-naru / gist:95669cb8fcbf14c22e59
Last active September 21, 2017 20:21
How to install max310x driver for RasPi 3.12.26+
# modify Kconfig to change to tristate
# make driver
sudo make prepare
sudo make modules_prepare KERNELRELEASE=$(uname -r)
sudo make SUBDIRS=drivers/tty/serial modules
sudo make SUBDIRS=drivers/tty/serial modules_install
sudo mv /lib/modules/3.12.26/extra/* /lib/modules/3.12.26+/extra/
sudo rm -r /lib/modules/3.12.26
sudo depmod