Skip to content

Instantly share code, notes, and snippets.

View chenyanming's full-sized avatar

Damon Chan chenyanming

View GitHub Profile
#![no_std]
use defmt_rtt as _;
use serde::{Serialize, Deserialize};
use postcard::{from_bytes_cobs, from_bytes};
use heapless::{consts::*, Vec as HVec};
use sm::sm;
type DVec = HVec<u8, U256>;
// const cmd_heartbeat_header: u8 = 0x10;
@chenyanming
chenyanming / fitness.org
Created October 4, 2020 04:45 — forked from alphapapa/fitness.org
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

@chenyanming
chenyanming / USAGE.md
Created June 14, 2020 12:56 — forked from mterwill/USAGE.md
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here
@chenyanming
chenyanming / .tmux.conf
Last active March 5, 2020 03:48 — forked from tsl0922/.tmux.conf
vim style tmux config
# vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
@chenyanming
chenyanming / vcard2org-contacts.py
Created March 4, 2020 14:50 — forked from tmalsburg/vcard2org-contacts.py
A simple script for converting vCard files to org-contacts.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Written by Titus von der Malsburg <[email protected]>, March 2014.
# This is a simple script for converting vCard files to
# org-contacts. There is one mandatory argument: the name of the
# vCard file. The result is printed to standard out.
# Usage:
@chenyanming
chenyanming / pandoc.css
Last active February 29, 2020 15:01 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}