Skip to content

Instantly share code, notes, and snippets.

View JayKickliter's full-sized avatar
💭
Cache Rules Everything Around Me

Jay Kickliter JayKickliter

💭
Cache Rules Everything Around Me
View GitHub Profile
@JayKickliter
JayKickliter / compdb.mk
Created February 28, 2018 21:26
Generate 'compile_commands.json' in Makefile
%.compdb_entry: %.c
@echo " {" > $@
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@
@echo " \"directory\": \"$(CURDIR)\"," >> $@
@echo " \"file\": \"$<\"" >> $@
@echo " }," >> $@
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES)))
compile_commands.json: $(COMPDB_ENTRIES)
@JayKickliter
JayKickliter / emacs-gfm.md
Last active November 13, 2022 18:38
Render github-flavored markdown (GFM) in emacs using `pandoc`

Command line usage

pandoc pandoc --quiet -f gfm -s somefile.md

What the options mean:

  1. --quiet: supress "[WARNING] This document format requires a nonempty <title> element."
  2. -f gfm: input format is Github Flavored Markdown
@JayKickliter
JayKickliter / brew-deps.md
Last active August 20, 2022 17:17
Building GNU Radio 3.10 on macOS 12
/opt/homebrew/bin/pip3 install packaging mako PyYAML
/Users/jay/forks/gr-lora/build (master *=) $ brew list
==> Formulae
abseil				fftw				hicolor-icon-theme		libtasn1			numpy				readline
adwaita-icon-theme		flac				hiredis				libtiff				oniguruma			ripgrep
aften				fmt				hub				libtool				open-mpi			scipy
@JayKickliter
JayKickliter / steps.md
Last active June 9, 2022 16:36
Debugging enif_protobuf segfault

Steps

# The following three lines are from the erl wrapper, 
# which is usually called instead of erlexec itself
export ROOTDIR="/home/jay/.local/OTP-23.3.4.8-debug/lib/erlang"
export BINDIR=$ROOTDIR/erts-11.2.2.7/bin
export EMU=beam

cgdb ~/.local/OTP-23.3.4.8-debug/lib/erlang/erts-11.2.2.7/bin/erlexec

Keybase proof

I hereby claim:

  • I am jaykickliter on github.
  • I am kickliter (https://keybase.io/kickliter) on keybase.
  • I have a public key ASAl309uF6BvENIx7WlC40Ywqh9Ot-ZsvU_LN9edh8yDwAo

To claim this, I am signing this object:

Functional

  • Haskell
  • Lisp
  • Erlang (underrated. Heavily used at Helium)

Concatative

  • APL/J/K/Q
  • FORTH
impl CurveAffine for G1Affine {
type Engine = Bls12;
type Scalar = Fr;
type Base = Fq;
type Prepared = G1Prepared;
type Projective = G1;
type Uncompressed = G1Uncompressed;
type Compressed = G1Compressed;
type Pair = G2Affine;
type PairingResult = Fq12;
@JayKickliter
JayKickliter / tickless.c
Created January 16, 2020 22:53
FreeRTOS tickless idle with STM32 LPTIM
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include "system_config_lptim.h"
#include "system_config_power.h"
#include "system_config_irq.h"
#include "FreeRTOS.h"
#include "FreeRTOSConfig.h"
@JayKickliter
JayKickliter / eu868_map.erl
Last active February 12, 2021 19:13
RSSIS to SNR curvefit
{
-7 => 7.6,
-8 => 7.8,
-9 => 7.8,
-10 => 7.9,
-11 => 8.0,
-12 => 8.0,
-13 => 8.0,
-14 => 8.0,
-15 => 8.0,
AlignAfterOpenBracket: Align # If true, horizontally aligns arguments after an open bracket.
AlignConsecutiveAssignments: true # This will align the assignment operators of consecutive lines
AlignConsecutiveDeclarations: true # This will align the declaration names of consecutive lines
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: TopLevel