Skip to content

Instantly share code, notes, and snippets.

View alnjxn's full-sized avatar

Alan Jackson alnjxn

View GitHub Profile
@alnjxn
alnjxn / bclconvertapp.py
Created May 4, 2012 02:19
IDF to INP Converter for NREL BCL
import Tkinter, tkMessageBox, sys, re, StringIO
from Tkinter import *
from tkFileDialog import askopenfilename
from tkFileDialog import asksaveasfilename
# run this on user click
def onClick():
try:
f = open(userDialog())
o = open(userSave(), 'w')
@alnjxn
alnjxn / Vagrantfile
Last active August 29, 2015 14:13
Vagrantfile for a simple Jekyll blog
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.vm.provider "virtualbox" do |vb|
vb.gui = false
@alnjxn
alnjxn / 2015-08-08-my-first-blog-post.md
Created August 8, 2015 21:16
Markdown Example (Credit: MarkItDown.net)
layout title date
post
My First Post!
2015-08-08

An exhibit of Markdown

This note demonstrates some of what [Markdown][1] is capable of doing.

Note: Feel free to play with this page. Unlike regular notes, this doesn't automatically save itself.

# alnjxn.zsh-theme
export VIRTUAL_ENV_DISABLE_PROMPT=1
function prompt_char {
git branch >/dev/null 2>/dev/null && echo 'λ' && return
echo 'λ'
}
function venv_info {
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 2.0G 4.0K 2.0G 1% /dev
tmpfs tmpfs 396M 696K 395M 1% /run
/dev/dm-0 ext4 55G 42G 11G 80% /
none tmpfs 4.0K 0 4.0K 0% /sys/fs/cgroup
none tmpfs 5.0M 0 5.0M 0% /run/lock
none tmpfs 2.0G 9.6M 2.0G 1% /run/shm
none tmpfs 100M 0 100M 0% /run/user
/dev/sda1 ext2 236M 71M 153M 32% /boot
none aufs 55G 42G 11G 80% /var/lib/docker/aufs/mnt/tmp-ny22flynn-aebb533c-e3a1-497f-ba50-5750d70bd60a
@alnjxn
alnjxn / init.vim
Created January 30, 2017 22:08
neovim config
" ----------------------------------------------------------------------------
" Plugins
" ----------------------------------------------------------------------------
call plug#begin('~/.config/nvim/plugged')
" Tim Pope
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-obsession'
@alnjxn
alnjxn / tti-poly-global_conf-template-US915.json
Created February 20, 2018 19:44
tti-poly-global_conf-template-US915
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 0,
"clksrc_desc": "radio_0 provides clock to concentrator",
"antenna_gain": 0,
"antenna_gain_desc": "antenna gain, in dBi",
"radio_0": {
"enable": true,
"type": "SX1257",
@alnjxn
alnjxn / tti-pkt-forwarder
Created February 20, 2018 21:50
tti-pkt-forwarder init script
#!/bin/bash
NAME="tti-packet-forwarder"
ENABLED="yes"
[ -f /etc/default/$NAME ] && source /etc/default/$NAME
run_dir=/var/run/lora
conf_dir=/var/config/lora
pkt_fwd=/opt/lora/poly_pkt_fwd
@alnjxn
alnjxn / converter.js
Last active September 5, 2018 18:50
Elsys Packet Decoder / Encoder for TTN
function Converter(decoded, port) {
// Merge, split or otherwise
// mutate decoded fields.
var converted = decoded;
// if (port === 1 && (converted.led === 0 || converted.led === 1)) {
// converted.led = Boolean(converted.led);
// }
return converted;