Skip to content

Instantly share code, notes, and snippets.

View MrFlynn's full-sized avatar
🚀
Building things

Nick Pleatsikas MrFlynn

🚀
Building things
View GitHub Profile
@MrFlynn
MrFlynn / riders.json
Last active August 30, 2025 05:16
Shields.io badge for BART Ridership Archive Repository
{"label":"2025-08-28","message":"207137 - 51%","schemaVersion":1,"color":"blue","logoSvg":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg sodipodi:docname=\"Bart-logo.svg\" inkscape:version=\"1.3.2 (091e20e, 2023-11-25, custom)\" id=\"svg8\" version=\"1.1\" viewBox=\"0 0 434.48291 264.585\" height=\"1000.0063\" width=\"1642.1401\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n <defs id=\"defs2\"/>\n <sodipodi:namedview inkscape:pagecheckerboard=\"true\" inkscape:document-rotation=\"0\" units=\"px\" inkscape:window-maximized=\"1\" inkscape:window-y=\"-8\" inkscape:window-x=\"-8\" inkscape:window-height=\"1137\" inkscape:window-width=\"1920\" showgrid=\"false\" inkscape:current-la
@MrFlynn
MrFlynn / cars.csv
Last active August 23, 2025 09:35
Fleet count information for BART's D & E or "Fleet of the Future" over time.
date cars_received cars_certified cars_in_service trains_in_service
2025-08-15 1013 1002 400 55
2025-08-01 1000 991 400 55
2025-07-28 1000
2025-07-21 994 976 400 55
2025-05-27 958 946 400 55
2025-04-29 938 931 400 55
2025-03-24 903 891 400 55
2025-01-29 887 870 400 55
2025-01-13 868 858 400 55
@MrFlynn
MrFlynn / main.go
Last active March 23, 2021 01:12
Convert Audio Files to DCA Format
package main
import (
"flag"
"io"
"log"
"os"
"github.com/jonas747/dca"
)
@MrFlynn
MrFlynn / extract_bear_backup.py
Created October 27, 2020 00:26
Extract individual files from Bear Notes backups/exports.
#!/usr/bin/env python3
#
# A script to extract notes from .bearbk files (backups from Bear Notes app).
import argparse
import sys
import zipfile
def normalize_name(full_name: str, filename: str) -> str:
@MrFlynn
MrFlynn / md-to-pdf.sh
Created May 16, 2020 22:42
Convert Markdown to PDF Using Pandoc (Docker)
#!/bin/bash
if [[ $# -lt 1 ]]; then
echo -e "Please specify filename!"
exit 1
fi
docker run -it -v $(pwd):/workdir \
pandoc/latext:latest \
pandoc "/workdir/$1" -o "/workdir/$1.pdf"
@MrFlynn
MrFlynn / KeyboardMacros.xml
Created September 15, 2016 06:52
Useful Linux keyboard macros for Raritan iKVM.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
<preferences EXTERNAL_XML_VERSION="1.0">
<root type="user">
<map/>
<node name="KeyboardMacros">
<map/>
<node name="Terminal 1">
<map>
<entry key="name" value="Terminal 1"/>
@MrFlynn
MrFlynn / checksum.ps1
Created June 28, 2016 09:00
Quick script to verify sha256 checksum of a file on Windows.
# Quick script to verify sha256 checksum of file on Windows.
# In order to run this script, you must be able to run unsigned powershell scripts.
# Run 'Set-ExecutionPolicy Unrestricted' as admin to run this script.
# Get image name and checksum from the user.
$image = Read-Host "Specify image name"
$expected_checksum = Read-Host "Specify checksum"
# Specify SHA256 checksum object.
@MrFlynn
MrFlynn / total_network_traffic.sh
Last active September 15, 2016 06:51
This script quickly shows how much data has been sent and received while the machine has been up.
#!/bin/bash
# Prints the total received traffic.
echo "Total received data this session: $(/sbin/ifconfig eth0 | sed '8!d' | awk '{ print substr($3 $4, 2, length($3 $4) - 2) }')"
# Prints the total sent traffic:
echo "Total sent data this session: $(/sbin/ifconfig eth0 | sed '8!d' | awk '{ print substr($7 $8, 2, length($7 $8) - 2) }')"
@MrFlynn
MrFlynn / legendre.py
Created February 2, 2016 20:46
Generates the solutions to n terms of a Legendre polynomial.
# Libraries:
import numpy as np
import math as m
# Global variables.
pi = m.pi
# num, num -> array()
# Takes a number of terms and the angle and returns an array of all
# terms between index 0 and n+1.
@MrFlynn
MrFlynn / solver.py
Last active January 8, 2016 03:51
Quick Newton's method solver I wrote for a project in calculus last spring.
# Solver : Newton's Method
# Initialization: -------------------------------------------------------------
# Libraries:
from sympy import *
import time, sys
# Pretty-Print:
print('\033[1m' + 'Please input a function equal to zero and a guess below.' + '\033[0m')