Skip to content

Instantly share code, notes, and snippets.

View jonsowman's full-sized avatar

Jon Sowman jonsowman

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@jonsowman
jonsowman / bq2060a.py
Created July 11, 2018 06:14
bq2060a EEPROM configuration
"""
BQ2060A configuration script
Jon Sowman 2018
"""
import sys
def int_to_signed_short(value):
"""
Convert signed integer to signed short.
@jonsowman
jonsowman / colloquy_push.py
Created April 18, 2016 13:32
weechat colloquy adapted for screen_away
import weechat
import json
import socket
import ssl
weechat.register("colloquy_push", "Benjie", "0.1", "MIT", "Implements Colloquy's iOS push notifications", "", "")
clients_in_progress = {}
known_clients = None
known_clients_string = weechat.config_get_plugin('known_clients')
#include <SPI.h>
#define SPI_READ_CMD 0x03
#define CS_PIN 10
unsigned int num_bytes;
unsigned int i;
void setup() {
Serial.begin(115200);
@jonsowman
jonsowman / receiver.ino
Created June 18, 2015 09:49
Arduino WS1081 Receiver (OOK/AM rx)
#define SHORT_PULSE 500
#define LONG_PULSE 1500
//#define SHORT_PULSE 350
//#define LONG_PULSE 1400
#define SHORT_MARGIN 300
#define LONG_MARGIN 300
//#define SHORT_MARGIN 50
//#define LONG_MARGIN 50
int val = 0;