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 / 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": "[email protected]",
"name": "MaggiesSummit2015Theme",
"updatedBy": "[email protected]",
"structure": {
"logo": {
"staticCSS": [
{
"key": "background-position",
{
"createdBy": "[email protected]",
"description": "",
"name": "Maggies Auto Accident Claim Form",
"updatedBy": "[email protected]",
"subscribers": [
"[email protected]"
],
"pageRules": [],
"fieldRules": [],
@conoro
conoro / README.md
Last active August 29, 2015 14:15 — forked from oodavid/README.md

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
#!/bin/bash
export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
export PASSPHRASE=YOU_PASSHRASE
# directories, space separated
SOURCE="/home/thomas/backup /home/thomas/bin /home/thomas/documents"
BUCKET=s3+http://mybucket
LOGFILE=/home/thomas/tmp/duplicity.log
# set email to receive a backup report
@conoro
conoro / gist:3130631
Created July 17, 2012 17:10 — forked from JerrySievert/gist:3119325
Working Node.js on Raspberry Pi
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages
2. sudo apt-get install git-core build-essential
3. Check out Node.js source (0.8.2)
4. Apply patch available at https://github.com/gflarity/node_pi (ignore most of the instructions)
5. Set up some variables:
$ export GYP_DEFINES="armv7=0"
$ export CXXFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT'
@conoro
conoro / facebook.py
Created December 17, 2011 12:24
Hacked version of "official" (but now unsupported) Facebook Python SDK to support OAuth 2.0
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#