Skip to content

Instantly share code, notes, and snippets.

View markuscraig's full-sized avatar

Mark Craig markuscraig

  • Jubilant
  • San Jose, CA
View GitHub Profile
@markuscraig
markuscraig / leopold_fc660c_programming.md
Last active May 21, 2022 11:40
Leopold FC660C TMK Keymap Programming

Leopold FC660C TMK Keymap Programming

  1. Build a keymap and download the TMK firmware (.hex file)
  2. Install flash programming tools...
    • Mac
      • $ brew tap osx-cross/avr
      • $ brew install avr-gcc
      • $ brew install dfu-programmer
    • Linux / Windows
  • Use the 'Atmel FLIP' app
@markuscraig
markuscraig / sync_gdrive.py
Last active November 1, 2023 11:11
Rclone + Google Drive sync script
#!/usr/bin/env python
import os
import shutil
import subprocess
# global variables
SYNC_DIRS = [
{
'src': "/Volumes/PhotoArchive/Lightroom",
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Debug 'Pace Errors by Firmware'" type="PythonConfigurationType" factoryName="Python" singleton="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="PYTHONPATH" value="$SPARK_HOME/python;$SPARK_HOME/python/lib/py4j-0.10.3-src-zip" />
<env name="SPARK_HOME" value="/usr/local/spark" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/venv/bin/python" />
@markuscraig
markuscraig / Debug_SparkTest.xml
Created October 17, 2016 22:34
Shared PyCharm 'Run Configuration' for a basic Spark integration test
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Debug SparkTest" type="PythonConfigurationType" factoryName="Python" singleton="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONPATH" value="$SPARK_HOME/python;$SPARK_HOME/python/lib/py4j-0.10.3-src.zip" />
<env name="PYTHONUNBUFFERED" value="1" />
<env name="SPARK_HOME" value="/usr/local/spark" />
</envs>
<option name="SDK_HOME" value="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7" />
@markuscraig
markuscraig / gist:770097c1ae53d565354af9e8b41c6093
Created May 10, 2016 19:33
Emanate 'Streaming Event' notification using the 'Cisco MSE JSON' data format
{
"StreamingNotification": {
"timestamp": "2016-05-10T12:14:38-07:00",
"deviceId": "11:22:33:44:55:66",
"subscriptionName": "Mainspring-Event-Stream",
"entity": "TAGS",
"floorRefId": 0,
"mseUdi": "AIR-MSE-3355-K9:V01:KQ37VL6",
"location": {
"BatteryInfo": {
@markuscraig
markuscraig / gist:92ad145a66a76d44d164
Created February 24, 2016 16:19
Example MSE JSON Notification
{
"StreamingNotification" : {
"deviceId" : "f0:ad:4e:03:21:d3",
"entity" : "TAGS",
"floorRefId" : 0,
"location" : {
"BatteryInfo" : {
"batteryAge" : 0,
"daysRemaining" : 98,
"lastReceivedSeqNum" : 54,
{
"StreamingNotification":{
"deviceId":"f0:ad:4e:03:21:ab",
"entity":"TAGS",
"floorRefId":0,
"location":{
"BatteryInfo":{
"batteryAge":0,
"daysRemaining":100,
"lastReceivedSeqNum":58,
@markuscraig
markuscraig / gist:1c56251d888b3acffe43
Created October 13, 2015 20:11
Example MSE JSON "Streaming Notification" for an Emanate PowerPath Tag Device
{
"StreamingNotification": {
"subscriptionName": "emanate-client-location-stream",
"entity": "TAGS",
"deviceId": "00:50:43:21:dd:30",
"mseUdi": "AIR-MSE-3355-K9:V01:KQ37VL6",
"floorRefId": 0,
"location": {
"macAddress": "00:50:43:21:dd:30",
"currentlyTracked": true,