Skip to content

Instantly share code, notes, and snippets.

@superjax
superjax / param_parse.py
Created February 5, 2017 00:47
ROSflight parameter file parser and markdown generator
import re
f = open('/home/ultron/Code/ROSflight/src/param.c')
text = f.read()
lines = re.split("\n+", text)
params = []
i = 0
@superjax
superjax / acai.xml
Created January 27, 2017 04:26
Qt Creator good-looking dark syntax theme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Acai">
<style name="Text" foreground="#ffffff" background="#2d2d2d"/>
<style name="Link" foreground="#0055ff"/>
<style name="Selection" foreground="#000000" background="#aaaaaa"/>
<style name="LineNumber" foreground="#888888" background="#232323"/>
<style name="SearchResult" background="#9e004f"/>
<style name="SearchScope" background="#550000"/>
<style name="Parentheses" foreground="#55ff55"/>
<style name="ParenthesesMismatch" background="#ff00ff"/>
@superjax
superjax / pycharm_keymap.xml
Last active January 27, 2017 04:27
A keymap for pycharm that uses mostly sublime bindings with a smattering of QtCreator bindings as well
<keymap version="1" name="James" parent="$default">
<action id="ActivateRunToolWindow">
<keyboard-shortcut first-keystroke="alt 4" />
<keyboard-shortcut first-keystroke="ctrl r" />
</action>
<action id="CheckinProject" />
<action id="CloseContent">
<keyboard-shortcut first-keystroke="ctrl w" />
</action>
<action id="CollapseAll">
@superjax
superjax / lookup_table_generator.py
Last active September 5, 2019 06:46
Python lookup table generation script
import numpy as np
import matplotlib.pyplot as plt
from math import sin, pi, asin, tan, atan
def f(x):
return ((1.0 - pow(x / 101325.0, 0.190284)) * 145366.45) * 0.3048
def finv(x):
return 101325.0 * (1 - 2.25577 * 10 ** -5 * x) ** 5.25588
@superjax
superjax / Makefile
Last active July 20, 2025 15:23
Makefile Template for compiling C/C++ for use with STM32 Microcontrollers
# Copyright (c) 2016, James Jackson
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation