Skip to content

Instantly share code, notes, and snippets.

Michael Farrell micolous

Block or report user

Report or block micolous

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@micolous
micolous / promotion.md
Last active Sep 21, 2019
Promoting personal GitHub repositories to an organisation
View promotion.md

Promoting personal GitHub repositories to an organisation account

When a project gets big, it makes sense to "promote" the repository to an organisation account.

The nice thing about [transferring a repository][] is that GitHub automatically creates redirects for you.

But the problem is for the project's creator -- they should create their own fork of the repository to send pull requests. GitHub doesn't prompt you for a repository name, so this will remove all those redirects created earlier.

These instructions presume:

@micolous
micolous / README.md
Created Jul 6, 2019
Laser cut Xiaomi Mi Band 2 Charger
View README.md

Laser cut Xiaomi Mi Band 2 Charger

This is a quick file to let you build a Xiaomi Mi Band 2 charger with a laser cutter.

The design is licensed CC-BY-SA 4.0.

Materials:

  • 60mm x 30mm of 3mm thick Plywood. You can use some other lasercuttable material, as long as it's at least 2mm thick.
  • 3x1 right angle pin header, with 2.54mm spacing
@micolous
micolous / anon.txt
Created Nov 11, 2018
testing with RejsekortReader
View anon.txt
Dumping dumps/anonymt_dump-20120814.mfd:
CMI: {'CardSerialNumber': aa9035d8,
'CardSerialNumberCheckByte': d7,
'ManufacturerData': bitarray('0000100100001001000000000100010111010011110101011000111001100100000000000000001010011000'),
'CalculatedCardSerialNumberCheckByte': d7
}
TCCI: {'MADInfoByte': bitarray('0000000000000000'),
'CardVersion': Integer 4 (bitarray('000100')),
'CardProvider': PTA be00: Rejsekortet A/S,
'CardValidityEndDate': DateCompact: 6573 2014-12-31 bitarray('01100110101101'),
@micolous
micolous / teensy_steno.ino
Created May 26, 2018
Teensy steno (tx bolt protocol)
View teensy_steno.ino
// teensy_steno
// Michael Farrell <micolous+git@gmail.com>
//
// This implements the TX Bolt protocol. It works with Teensy LC, but should work
// with other Arduino compatibles (once you fix touch inputs).
//
// This version supports arbitrary keymaps, so you don't need to wire the keyboard
// the same as the TX Bolt protocol. This should make scanning around twice as fast.
//
// This uses a "touch" sensitive pin (18) for the number bar.
@micolous
micolous / stripey.html
Last active Jan 23, 2018
repro opsis issue?
View stripey.html
<html>
<head>
<style type="text/css">
html {
background: repeating-linear-gradient(
90deg,
#000,
#000 2px,
#fff 2px,
@micolous
micolous / greencard_reader.py
Created Jan 29, 2017
Prototype reader for Greencard (TAS) card dumps.
View greencard_reader.py
#!/usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; tab-width: 2 -*-
"""
greencard_reader.py
Prototype reader for Greencard (TAS) card dumps.
See https://github.com/micolous/metrodroid/wiki/Greencard for format details.
Copyright 2017 Michael Farrell <micolous+git@gmail.com>
Note: This loads the entire file into memory blindly. Do not use on large file
@micolous
micolous / myway_reader.py
Created Dec 21, 2016
Prototype reader for MyWay card dumps.
View myway_reader.py
#!/usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; tab-width: 2 -*-
"""
myway_reader.py
Prototype reader for MyWay (ACT) card dumps.
See https://github.com/micolous/metrodroid/wiki/MyWay for format details.
Copyright 2016 Michael Farrell <micolous+git@gmail.com>
Note: This loads the entire file into memory blindly. Do not use on large file
@micolous
micolous / tfnsw_api.json
Created Apr 24, 2016
Swagger API for the Transport for NSW Open Data portal.
View tfnsw_api.json
{
"info": {
"version": "1.0",
"license": {
"url": "https://creativecommons.org/licenses/by/4.0/legalcode",
"name": "CC-BY-4.0"
},
"title": "Transport for NSW Open Data API"
},
"paths": {
View source-v4l-cam1.sh
#!/bin/sh
ffmpeg -y \
-f v4l2 \
-input_format mjpeg \
-i /dev/video0 \
-framerate 25 \
-video_size 640x360 \
-s 1280x720 \
-c:v rawvideo -c:a pcm_s16le \
-pix_fmt yuv420p \
@micolous
micolous / gocard.py
Last active Dec 13, 2015
Requires mfoc dump in mfc format (1 kilobyte)
View gocard.py
import argparse, struct, base64, datetime
MODES = {
1: 'Value-add machine',
4: 'Bus',
5: 'Train',
18: 'Ferry',
}
STATIONS = {
You can’t perform that action at this time.