This copy of the script is no longer updated, but I'll leave it here for reference.
DEVICE = attiny13a | |
CLOCK = 1200000 | |
PROGRAMMER = -c dragon_isp | |
SOURCES = $(shell find . -name '*.c' -or -name '*.cpp' -or -name '*.S') | |
OBJECTS = $(SOURCES:.c=.o) | |
AVRDUDE = avrdude $(PROGRAMMER) -p t13 | |
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) | |
COMPILE += -I -I. -I./lib/ | |
COMPILE += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
Install https://pypi.python.org/pypi/libusb1
# Create rule so the device can be controlled by any user
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="f055", ATTR{idProduct}=="05df", MODE="0666"' \
| tee /etc/udev/rules.d/99-status-light.rules
#import <Foundation/Foundation.h> | |
#import "RCTBridgeModule.h" | |
@interface TimerModule : NSObject <RCTBridgeModule> | |
@end |
#!/usr/bin/env python3 | |
# Experiment: Replacing the LED in an infrared remote with a wired connection | |
# | |
# Details of the hardware/software implementation: | |
# | |
# I've hard-wired the crappy IR remote that came with a DVB-T RTL-SDR | |
# dongle into a GPIO pin on the Raspberry Pi. The infrared LED in the | |
# remote has been removed and replaced with a wire going to GPIO 3. | |
# |
Note: this is an extract from Heyday's internal docs, written by me. Published as a Gist to share the love.
We like sensible commit messages. There're a lot of good articles about writing great, useful commit messages, but here's the gist of what we like:
- The single most important thing is: commit messages should explain why you are making the change.
- Think, "what would future me want to know about this change?"
- Avoid committing multiple sets of ideas/changes in the same commit: split them up.
- Don't assume the reader understands what the original problem was.
This is an experimental database fetching tool for projects using SilverStripe
with _ss_environment.php
files for database config and Beam.
A project's beam.json
config is used to find SSH connection details, and the database details
for that environment are read from the _ss_environment.php file on the server.
This is essentially a wrapper to build and run a shell command like this:
Automates the UI actions (clicks, typing) to sell Steam trading cards from the Steam web interface. To use this:
- Log into your Steam account in Chrome
- Go to [Username] -> Inventory
- Open the Javascript console (View -> Developer -> Javascript Console)
- Paste in the entire script below and press enter
- To start selling all trading cards in your inventory, type
doHax()
in the console and press enter - ...
<?php | |
/** | |
* Apply the SiteTree edit/view/delete permissions/roles to any DataObject | |
* | |
* By default DataObjects are only writable by admin users, which isn't all that useful. | |
* The null return values indicate to the calling code in DataObject that the extended | |
* method shouldn't affect the outcome of the permission check. | |
* | |
* @see DataObject::extendedCan() |