Skip to content

Instantly share code, notes, and snippets.

View witnessmenow's full-sized avatar

Brian Lough witnessmenow

View GitHub Profile
@witnessmenow
witnessmenow / YT.ino
Created April 10, 2019 19:54
Example of Wifi 7 seg
/*******************************************************************
Read YouTube Channel statistics from the YouTube API
* *
By Brian Lough
https://www.youtube.com/channel/UCezJOfu7OtqGzd5xrP3q6WA
*******************************************************************/
#include <YoutubeApi.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
@witnessmenow
witnessmenow / the.cpp
Created April 10, 2019 19:52
Wifi 7 Seg library Changes
/***************************************************
This is a library for our I2C LED Backpacks
Designed specifically to work with the Adafruit LED Matrix backpacks
----> http://www.adafruit.com/products/
----> http://www.adafruit.com/products/
These displays use I2C to communicate, 2 pins are required to
interface. There are multiple selectable I2C addresses. For backpacks
with 2 Address Select pins: 0x70, 0x71, 0x72 or 0x73. For backpacks
@witnessmenow
witnessmenow / sketch.ino
Created March 17, 2019 12:19
AlarmClock code with EZTime library
#include <ESP8266WiFi.h>
#include <TM1637Display.h>
#include <ezTime.h>
// Both can be installed from library manager
char ssid[] = "SSID"; // your network SSID (name)
char password[] = "password"; // your network password
// Module connection pins (Digital Pins)
/*********************************************************************
This is an example sketch for our Monochrome Nokia 5110 LCD Displays
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/products/338
These displays use SPI to communicate, 4 or 5 pins are required to
interface
Adafruit invests time and resources providing this open source code,
@witnessmenow
witnessmenow / wpa_supplicant.conf
Created June 14, 2018 15:46
Example wpa_supplicant.conf file for headless raspberry pi setup
country=ie
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="ssid"
psk="password"
}
@witnessmenow
witnessmenow / BTMakeyMakey
Created October 9, 2017 23:51
Arduino code for a bluetooth Makey Makey running on an ESP8266
#include <Wire.h>
#define ttp229 (0xAF>>1)
uint16_t data_out = 0;
uint16_t data1, data2;
int count = 0;
boolean count2 = false;
// https://github.com/witnessmenow/BPLib
#include <BPLib.h>
#include <SoftwareSerial.h>
@witnessmenow
witnessmenow / Instructions
Created September 22, 2017 10:58
Backup a file using telegram, backup runs every day at 2:30
Create the backup.sh file and paste in contents of the file
Edit the crontab: crontab -e
30 2 * * * /root/backup.sh
@witnessmenow
witnessmenow / webpack.prod.config.js
Created May 5, 2016 13:15
Example production webpack configuration for wrapping a react component using webpack
const webpack = require('webpack');
module.exports = {
entry: './wrapper.js',
output: {
libraryTarget: 'var',
library: 'showChatTemplate',
path: 'builds',
filename: 'chat-template-min.js',
},
@witnessmenow
witnessmenow / example.html
Created May 5, 2016 13:06
Example of using chat-template.js
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>react-webpack-wrapper-example</title>
@witnessmenow
witnessmenow / webpack.dev.config.js
Created May 5, 2016 13:04
Example dev webpack configuration for wrapping react modules
module.exports = {
entry: './wrapper.js',
output: {
libraryTarget: 'var',
library: 'showChatTemplate',
path: 'builds',
filename: 'chat-template.js',
},
module: {