Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@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

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 / 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()
@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 / 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 / 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 / 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 / yunmai_protocol.txt
Created March 28, 2017 14:38 — forked from pwnall/yunmai_protocol.txt
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Yunmai smart scale (M1301, M1302, M1303) Bluetooth LE protocol notes
Commands are written to GATT attribute 0xffe9 of service 0xffe5. Responses come
as value change notifications for GATT attribute 0xffe4 of service 0xffe0. These
are 16-bit Bluetooth LE UUIDs, so nnnn is 0000nnnn-0000-1000-8000-00805F9B34FB.
-----
Packet Structure
{
"_id": "55789e363bb743bc298ff517",
"createdBy": "mhu@redhat.com",
"name": "MaggiesSummit2015Theme",
"updatedBy": "mhu@redhat.com",
"structure": {
"logo": {
"staticCSS": [
{
"key": "background-position",
{
"createdBy": "mhu@redhat.com",
"description": "",
"name": "Maggies Auto Accident Claim Form",
"updatedBy": "mhu@redhat.com",
"subscribers": [
"mhu@redhat.com"
],
"pageRules": [],
"fieldRules": [],