Skip to content

Instantly share code, notes, and snippets.

View ajfisher's full-sized avatar

ajfisher ajfisher

View GitHub Profile
@ajfisher
ajfisher / firmatatest.js
Last active December 22, 2019 08:15
Serial comms over hardware UART for Johnny-Five between Arduino and a Raspberry Pi
var firmata = require('firmata');
var repl = require('repl');
var board = new firmata.Board('/dev/ttyAMA0',function(err){
//arduino is ready to communicate
if (err) {
console.log("err:" + err);
return;
}
console.log("Firmata Firing LEDs");
@ajfisher
ajfisher / blink.js
Last active July 30, 2019 03:50
BT LED Blinker
@ajfisher
ajfisher / LICENSE
Last active December 4, 2018 20:42
Set up some Christmas lights to pulse depending on keywords being made on twitter
Copyright (c) Andrew Fisher and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
@ajfisher
ajfisher / twitter-fix.md
Last active March 1, 2018 06:42
CSS fixes to Twitter web client to remove all the inline previews

Twitter Web Client Inline Image Removal

If you're a heavy user of the Twitter web client like me then you'll find the new inline preview feature extremely intrusive as it breaks up the timeline too much. If I wanted to use facebook or linkedin then I'd be using facebook or linkedin. Having said that, cards in Twitter are great and the ability to preview media before jumping off site is really cool - but it should be my choice, not have everything foisted on my timeline.

That the mobile client allows for this with a setting is even more annoying.

So here's the fix. This only works in Chrome but I'm sure an enterprising person could do something similar for Safari and Firefox using the same CSS. Pull requests to update instructions for other browsers are of course very welcome.

Updates

@ajfisher
ajfisher / fullscreen.md
Created November 14, 2014 10:05
How to make Cricket Australia Live Stream work full screen on your PC.

Making your Cricket Australia live stream bigger.

If you signed up for Cricket Australia's digital streaming service this summer you'd be pretty disappointed with the very tiny size of the video stream. For those of us that can't get terrestrial TV for whatever reason and use digital services and paid good money for them this is a terrible decision.

Thankfully, with a bit of CSS-fu it's possible to get an almost full-screen video feed and get rid of all those rubbish ads to boot.

This is version one - mostly because I only did enough to be satisfied watching the first ODI. I'll keep this updated and refine it over the course of the summer.

Install and configure

@ajfisher
ajfisher / _Pebble controlled NeoPixels using ESP8266.md
Last active January 3, 2017 23:51
Using a pebble watch to control NeoPixel (WS2812 ) LEDs via an ESP8266 controller
@ajfisher
ajfisher / esp8266_mqtt.ino
Created August 29, 2016 11:06
Bits for an MQTT server from ESP8266
/*
Basic ESP8266 MQTT example
This sketch demonstrates the capabilities of the pubsub library in combination
with the ESP8266 board/library.
It connects to an MQTT server then:
- publishes "hello world" to the topic "outTopic" every two seconds
- subscribes to the topic "inTopic", printing out any messages
it receives. NB - it assumes the received payloads are strings not binary
@ajfisher
ajfisher / package.json
Created August 18, 2016 08:47
Laser pan tilt code
{
"name": "lasertest",
"version": "1.0.0",
"description": "Used to pan tilt and fire a laser",
"main": "led.js",
"dependencies": {
"johnny-five": "^0.9.53"
},
"devDependencies": {},
"scripts": {
@ajfisher
ajfisher / matrix.js
Created July 30, 2016 06:12
Dirty version of mbot LED matrix working with johnny-five
var five = require("johnny-five");
var board = five.Board();
//Define Data Command Parameters
var Mode_Address_Auto_Add_1 = 0x40 //0100 0000 B
var Mode_Permanent_Address = 0x44 //0100 0100 B
board.on("ready", function() {
@ajfisher
ajfisher / __Notes.md
Created July 7, 2016 14:25
PoC for ProximityArray

To try it out make sure you use the latest backpack from ajfisher/nodebots-hcsr04 using i2c_multiping branch