Skip to content

Instantly share code, notes, and snippets.

View technobly's full-sized avatar

Brett Walach technobly

View GitHub Profile
@technobly
technobly / stalkbot.js
Last active December 17, 2015 21:29
A Turntable.fm bot that stalks a specific user. If they are on, it will find them, and follow them... log the chat in their room to the console. >:| muwhahahaha!!!
// .d8888b. 88888888888 d8888 888 888 d8P 888888b. .d88888b. 88888888888
// d88P Y88b 888 d88888 888 888 d8P 888 "88b d88P" "Y88b 888
// Y88b. 888 d88P888 888 888 d8P 888 .88P 888 888 888
// "Y888b. 888 d88P 888 888 888d88K 8888888K. 888 888 888
// "Y88b. 888 d88P 888 888 8888888b 888 "Y88b 888 888 888
// "888 888 d88P 888 888 888 Y88b 888 888 888 888 888
// Y88b d88P 888 d8888888888 888 888 Y88b 888 d88P Y88b. .d88P 888
// "Y8888P" 888 d88P 888 88888888 888 Y88b 8888888P" "Y88888P" 888
//
// Stalkbot - Copyright (C) 2013 B^Dub - dubbytt@gmail.com - Last update May 31st 2013
@technobly
technobly / autoreconnect.js
Created June 15, 2013 21:25
A Turntable.fm bot that automatically reconnects to tt.fm after the internet connection goes away and comes back, or tt.fm goes down for maintenance and comes back. Responds to /uptime command and will report uptime, how many times it has been down and how long the last time was.
// .d8888b. 888 888 d8888 88888888888 88888888888 Y88b d88P
// d88P Y88b 888 888 d88888 888 888 Y88b d88P
// 888 888 888 888 d88P888 888 888 Y88o88P
// 888 8888888888 d88P 888 888 888 Y888P
// 888 888 888 d88P 888 888 888 888
// 888 888 888 888 d88P 888 888 888 888
// Y88b d88P 888 888 d8888888888 888 888 888
// "Y8888P" 888 888 d88P 888 888 888 888
//
// ChattyTT - Copyright (C) 2013 B^Dub - dubbytt@gmail.com - Last update June 15th 2013
@technobly
technobly / bot.js
Last active December 18, 2015 13:28
Added ability to catch websocket errors and detect if bot is alive to latest Turntable.fm API (note this is required if you want to run the autoreconnect.js bot)
// 88888888888 88888888888 8888888888 888b d888 d8888 8888888b. 8888888
// 888 888 888 8888b d8888 d88888 888 Y88b 888
// 888 888 888 88888b.d88888 d88P888 888 888 888
// 888 888 8888888 888Y88888P888 d88P 888 888 d88P 888
// 888 888 888 888 Y888P 888 d88P 888 8888888P" 888
// 888 888 888 888 Y8P 888 d88P 888 888 888
// 888 888 d8b 888 888 " 888 d8888888888 888 888
// 888 888 Y8P 888 888 888 d88P 888 888 8888888
//
// Compiled bot.js for autoreconnect.js example @ https://github.com/alaingilbert/Turntable-API
@technobly
technobly / SparkPWM.cpp
Created January 8, 2014 08:13
SPARK CORE CUSTOM PWM FREQUENCY EXAMPLE Define your own frequency! PWM Glitch issue fixed!!
//-----------------------------------------------
// SPARK CORE CUSTOM PWM FREQUENCY EXAMPLE
//===============================================
// Define your own frequency below!
// PWM Glitch issue fixed, only sets up PWM once,
// ... thereafter sets duty cycle.
// This allows true 0 - 100% PWM.
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//-----------------------------------------------
@technobly
technobly / SparkCoreWS2801.cpp
Last active April 29, 2018 21:57
SPARK CORE Adafruit_WS2801 LIBRARY & EXAMPLE
//-----------------------------------------------//
// SPARK CORE Adafruit_WS2801 LIBRARY & EXAMPLE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
// Read comments in APPLICATION.CPP section for //
// Hookup details! //
//-----------------------------------------------//
// Technobly / BDub - Jan 9th, 2014 //
//===============================================//
@technobly
technobly / sparkStepper.cpp
Last active May 5, 2017 22:47
Spark Core Stepper Library
//-----------------------------------------------//
// STEPPER LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
/*
@technobly
technobly / tempDilutionFilt.cpp
Created January 9, 2014 21:05
Temperature filtering with a 1/16th Dilution Filter for Spark Core
//----------------------------------------------------
// Temperature filtering with a 1/16th Dilution Filter
// BDub 12-21-2013
//
// 1/16th of the new reading gets added to the ongoing
// running total of 16 virtual readings, with a little
// correction for the truncation process. Very fast
// filter for slow 8-bit uC's that don't have multiply
// or divide instructions.
//
@technobly
technobly / sparkTone.cpp
Created January 9, 2014 21:08
Simple Tone Generator for the Spark Core
//-----------------------------------------------//
// SPARK CORE SIMPLE TONE GENERATOR //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
#define NOTE_B2 4065
@technobly
technobly / sparkLiquidCrystal.cpp
Created January 9, 2014 21:13
LiquidCrystal LIBRARY for SPARK CORE
//-----------------------------------------------//
// LIQUIDCRYSTAL LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
@technobly
technobly / sparkBitBang.cpp
Created January 9, 2014 21:17
Simple Bit-Bang (Direct Port Manipulation) for Spark Core
//-----------------------------------------------
// Simple Bit-Bang Example
//===============================================
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//-----------------------------------------------
// Technobly / BDub - Jan 2014
//===============================================
uint16_t pin = D7;