Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / web_bluetooth_set_time.html
Last active June 14, 2017 16:12
Web Bluetooth Set/Get Time Puck.js
<html>
<head>
</head>
<body>
<script src="https://espruino.github.io/js/puck.js"></script>
<script>
var d = new Date();
var n = Math.round(d.getTime()/1000);
var puckCommand = "setTime(" + n + ")\n";
</script>
@conoro
conoro / building-espurna-for-ai-light-and-esp8266.md
Last active June 29, 2017 06:38
Building Espurna for AI-Thinker AI Light and ESP8266
@conoro
conoro / puckjs_kulight.js
Created August 20, 2017 17:42
Using Puck.js with the KuLight RGB Bluetooth Lightbulb
// See https://conoroneill.net/using-puck-js-with-kulight-rgb-bluetooth-lightbulb/
// and https://www.espruino.com/Puck.js+and+Bluetooth+Lightbulbs
/*
On = 0x02, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Off = 0x32, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Red = 0x02, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Orange = 0x02, 0xff, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Yellow = 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Green = 0x02, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@conoro
conoro / update-youtube-dl.cmd
Created October 20, 2017 17:20
Grab the latest version of youtube-dl every week
cd C:\Users\conor
bash -c "./update-youtube-dl.sh"
@conoro
conoro / get-youtube.py
Last active February 3, 2018 14:48
Get YouTube. Tiny wrapper on youtube-dl for running on Android and prompting for URL
# get-youtube.py
# Wrapper around youtube-dl for Android
# Grabs URL from clipboard if it's a YouTube one. Otherwises prompts for URL
# See https://conoroneill.net/downloading-youtube-videos-for-offline-viewing-on-android/ for instructions
# Copyright Conor O'Neill 2018. Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
from __future__ import unicode_literals
from androidhelper import Android
droid = Android()

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@conoro
conoro / marcha_imperial
Created November 25, 2019 08:22 — forked from tagliati/marcha_imperial
Marcha imperial para arduino
int ledPin = 13;
//led for visualization (use 13 for built-in led)
int speakerPin = 11;
//speaker connected to one of the PWM ports
#define c 261
#define d 294
#define e 329
#define f 349
@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
@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 / 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.