Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / George_Foreman_Timer_02.ino
Created December 20, 2023 09:32
Arduino Franken-Timer for George Foreman Grill. ESP32-S2 with Hardware SPI to OLED screen. Tune on simple speaker.
#include "pitches.h"
#include "CountDown.h"
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <Fonts/FreeSans24pt7b.h>
#include <SPI.h>
#define TFT_CS 10
#define TFT_RST 7
#define TFT_DC 5
@conoro
conoro / build_sqlitestudio_raspi.sh
Created February 18, 2022 04:24
Build SQLiteStudio 3 on Raspberry Pi 4 64-bit OS
sudo apt-get install qt5-default qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools tcl tcl-dev libreadline-dev qtscript5-dev libsqlite3-dev qttools5-dev libqt5svg5-dev
curl -o sqlitestudio-3.3.zip https://codeload.github.com/pawelsalawa/sqlitestudio/zip/refs/heads/3.3
unzip sqlitestudio-3.3.zip
cd sqlitestudio-3.3
mkdir -p output/build
cd output/build
qmake "CONFIG += portable" ../../SQLiteStudio3
make
cd ../SQLiteStudio/
./sqlitestudio
@conoro
conoro / exampledb.json
Last active August 5, 2021 16:08
Using GIST as a simple JSON DB
[
{
"color": "red",
"value": "#f00"
},
{
"color": "green",
"value": "#0f0"
},
{
@conoro
conoro / brella_attendees.js
Created May 13, 2021 16:20
Extract the list of attendees at a Brella-powered conference from the local saved HTML to CSV
var fs = require('fs');
const cheerio = require('cheerio');
const data = fs.readFileSync('Brella_Page1.html');
var $ = cheerio.load(data);
$('.e1h0e2yk3').each(function (i, elem) {
const name = $(this).find(".e1h0e2yk6").text();
const title = $(this).find(".e1h0e2yk7").text();
const desc = $(this).find(".e1h0e2yk9").text();
@conoro
conoro / picoris.cpp
Last active February 21, 2021 10:47
Tetris on Raspberry Pi Pico from Reddit post
// Just a copy of the code referenced here: https://www.reddit.com/r/raspberry_pi/comments/l6flip/a_very_tiny_game_of_tetris_my_first_test_of_the/
// With minor changes to make it compile
#include <string.h>
#include <math.h>
#include <vector>
#include <cstdlib>
#include "pico_display.hpp"
//#include "pico/multicore.h"
@conoro
conoro / kaios_windows_2020.md
Created August 10, 2020 11:31
Setting up a KaiOS Dev Environment on Windows in August 2020

Horrendous list of deprecated, missing or old tools/files that you have to use to develop on KaiOS in 2020. This is how I got it working.

  • Install Firefox 59 from here: https://ftp.mozilla.org/pub/firefox/releases/59.0/win64/ in a non-standard location
  • Immediately go into Firefox Settings and disable automatic-updates or it'll get rid of version 59 after it restarts (you may have to do this several times)
  • Unzip ADB Tools to c:\platform-tools and add that to the Windows Path
  • Enable Developer mode on your phone "Device > Developer > Debugger > ADB and DevTools" if that menu is visible.
  • If Developer menu not visible, type the following on your phone: *#*#0574#*#*
  • And then go into the ADB setting that appears on the screen and enable it
  • Then type the following on your phone: *#*#33284#*#* to enable developer mode
  • Plug your phone into your PC with a USB cable and unlock the screen
@conoro
conoro / stop_chromium_check.sh
Created July 2, 2020 04:41
Stop Chromium on RPi saying it's out of date
sudo touch /etc/chromium-browser/customizations/01-disable-update-check;echo CHROMIUM_FLAGS=\"\$\{CHROMIUM_FLAGS\} --check-for-update-interval=31536000\" | sudo tee /etc/chromium-browser/customizations/01-disable-update-check
@conoro
conoro / updating_banglejs.md
Last active January 21, 2023 18:47
Updating the firmware on your NodeWatch/Bangle.js

Updating the firmware on your NodeWatch/Bangle.js

Hi Banglers,

We hope you've been having fun experimenting with your Bangle.js and wanted to let you know about some important updates to the software for it.

The version of software on your Bangle.js is a very early release and has been improved hugely since November. Some of you may have encountered bugs with the middle button or find that some of the newer Apps on banglejs.com/apps don't work as they should.

Updating the software will solve these issues and get you access to new apps such as early Gadgetbridge integration for Android phone notifications.

@conoro
conoro / banglejs_accelerometer_output.js
Created December 18, 2019 16:34
Output the detected accelerometer data from Bangle.js to train a TensorFlow model
name="Gesture";
function gotGesture(d) {
print(name+"("+d.length/3+"),",d.slice().join(","));
g.clear();
g.setColor(1,1,1);
var my = g.getHeight()/2;
var sy = my/128;
var sx = g.getWidth()/(50*3);
@conoro
conoro / rpi_64bit_chroot.sh
Last active June 26, 2022 12:53
64-bit Raspberry Pi 4 chroot
sudo apt install -y debootstrap schroot
cat << EOF | sudo tee /etc/schroot/chroot.d/pi64
[pi64]
description=V3D arm64 testing
type=directory
directory=/srv/chroot/pi64
users=pi
root-groups=root
profile=desktop
personality=linux