Skip to content

Instantly share code, notes, and snippets.

(() => {
const COMMON_WORDS = [
'a', 'an', 'and', 'are', 'as', 'at', 'be', 'been', 'being', 'but', 'by', 'do', 'for', 'from', 'go',
'he', 'her', 'here', 'hero', 'him', 'his', 'how', 'i', 'if', 'in', 'input', 'is', 'it', 'its', 'me',
'music', 'my', 'naive', 'of', 'on', 'or', 'our', 'out', 'phone', 'quick', 'she', 'swipe', 'swype',
'text', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'to', 'type',
'typing', 'use', 'vocabulary', 'we', 'what', 'when', 'where', 'which', 'who', 'why', 'with', 'word',
'words', 'world', 'you', 'your', 'doctor', 'architecture', 'agriculture', 'android', 'work'
];
@silverjam
silverjam / p5js-parallax-demo.js
Created July 1, 2026 18:51
p5.js parallax demo
(() => {
const sketch = (p) => {
const canvasX = 400;
const canvasY = 400;
class Position {
constructor() { this.x = 0; this.y = 0; }
}
class Delta {
@silverjam
silverjam / main.cpp
Created July 15, 2020 06:04
Arduino remote hack using esp8266 (NodeMCU) and some relays
#include <Arduino.h>
#include <ESP8266WiFi.h>
char ssid[] = "An Wi-Fi";
char pass[] = "xxx";
int status = WL_IDLE_STATUS;
#define BUTTON1_ON_PIN D1
#define BUTTON1_OFF_PIN D2
import sys
import gnss
import sbp
from typing import Union
from sbp.client import Handler, Framer
from sbp.client.drivers.file_driver import FileDriver
use std::boxed::Box;
use std::error::Error;
use std::fs::File;
use std::io::BufReader;
use std::io::ErrorKind;
use std::result::Result;
use sbp::messages::SBP;
use sbp::messages;
[package]
name = "sbptest"
version = "0.1.0"
authors = ["Jason Mobarak <jason@swiftnav.com>"]
edition = "2018"
[dependencies]
sbp = { git = "https://github.com/swift-nav/libsbp", branch = "master" }
@silverjam
silverjam / jira.py
Created February 6, 2020 16:23
JIRA scripting with Python
from jira import JIRA
server = "https://swift-nav.atlassian.net"
api_key = open('jira_api_key.txt').read()
# print(api_key)
basic_auth = ('jason@swift-nav.com', api_key)
# Query string for the cloned issues:
query_str = 'project = INFRA AND issuekey >= INFRA-77 AND issuekey <= INFRA-83 AND creator = currentUser()'
@silverjam
silverjam / cli.dhall
Created September 20, 2019 18:21
Generating lots of YAML with Dhall (recursive incoation translation)
let Argument : Type =
List
{ mapKey : Text
, mapValue :
{ help : Text
, index : Integer
, required : Bool
, takes_value : Bool
, value_name : Text
}
@silverjam
silverjam / socat.bash
Last active April 12, 2019 07:12
socat experiments
# Create input FIFO
rm -f /tmp/input.fifo
mkfifo /tmp/input.fifo
# Bind to FD in the shell to keep the FIFO alive
exec 10<>/tmp/input.fifo
# Create output FIFO
rm -f /tmp/output.fifo
mkfifo /tmp/output.fifo
# Bind to FD in the shell to keep the FIFO alive
# Usage: python dist_to_ntrip_caster.py
#
# Get list of NTRIP caster streams:
# > curl https://cddis-caster.gsfc.nasa.gov/ -o caster_reg.txt
#
# Find streams that support GPS + base station messages:
# > grep 1004.*100[56] caster_reg.txt >creg_gps.txt
#
# Find streams that support GLO + base station messages:
# > grep 100[56].*1012 caster_reg.txt >creg_glo.txt