Skip to content

Instantly share code, notes, and snippets.

r8d8 /
Last active Oct 9, 2021
Power Paraglider (PPG) gauge

Create electronic gauge capable to collet and display next metrics of PPG engine:

  • Engines RPM (RPM)
  • Engine head temperature (only for air-cooled engines) (Celsius)
  • Total engine hours (hours)
  • Altitude (meters)

Gauge should have 2 modes (Fig. 2):

  • Dual meter
  • Quad meter
View Makefile
# Determine the platform
UNAME_S := $(shell uname -s)
CC := clang++
# Folders
SRCDIR := ./
BUILDDIR := build
echo "How many numbers do you want of Fibonacci series ?"
read total
echo "Fibonacci Series up to $total terms :: "
echo "$x"
echo "$y"
View bigint.c
* Copyright (c) 2007, Cameron Rich
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
r8d8 / lisp.lua
Last active Jul 6, 2018
Lisp in Lua
View lisp.lua
function eval(x)
if type(x)=="table" then
return eval(x[1])(eval(x[2]),eval(x[3]))
return x
function add(x,y) return x+y end
function sub(x,y) return x-y end
r8d8 /
Created May 10, 2018
Serde error while enum flattening
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq)]
pub struct KdfParams {
/// Key derivation function
pub kdf: Kdf,
/// `Kdf` length for parameters
pub dklen: usize,
/// Cryptographic salt for `Kdf`
r8d8 /
Last active Apr 13, 2018
Golang code style

The code should be read sequentially from beginning to end as a good prose, for code it means grouping logic from main high-level concepts to particular low-level details. In the rest, we simply follow S.O.L.I.D principals.

Recommended way to organize the code:

Length limits (inspired by NASA C Style guide):

  • function body <= 60 loc (to be suitable for single screen)
  • source file <= 600 loc
View cli.yaml
name: emerald
version: "0.20.0"
about: Command-line interface for Emerald platform
- chain:
short: c
help: Sets a chain name
default_value: mainnet
takes_value: true
- version:

Keybase proof

I hereby claim:

  • I am r8d8 on github.
  • I am r8d8 ( on keybase.
  • I have a public key ASC1WxjDRY3kpo5i4jm9lOgv08WmBL7yx8nMjR9xI6B7Fgo

To claim this, I am signing this object: