Skip to content

Instantly share code, notes, and snippets.

View mattstep's full-sized avatar
🛩️
Flying

Matt Stephenson mattstep

🛩️
Flying
View GitHub Profile
@mattstep
mattstep / cloudflared.yaml
Created February 23, 2023 16:36
Example of how to run cloudflared with unms
ingress:
- service: "https://172.19.0.3:18443"
originRequest:
noTLSVerify: true
@mattstep
mattstep / inreachwx.go
Created September 26, 2020 00:11
Hack for getting wx reports via inreach messaging.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
Smith, TJ's branch, includes support for type: container : https://github.com/tjfontaine/smith
docker commands:
docker save $OUTPUT_IMAGE:latest | gzip -c > $BUILD_DIR/fullsize.tgz
docker pull tjfontaine/smith:latest
docker run --rm -v $BUILD_DIR:/write -v tmp:/tmp tjfontaine/smith:latest --verbose --docker -i /write/smithsize.tgz -t $OUTPUT_IMAGE:latest
docker load -i $BUILD_DIR/smithsize.tgz
timestamps {
node('my-docker-agent-template') {
withDir('work') {
checkout scm
withEnv(["JAVA_HOME=${tool 'jdk8' }",
"PATH+MAVEN=${tool 'maven3'}/bin:${env.JAVA_HOME}/bin"]) {
sh 'mvn clean install'
}
junit 'target/surefire-reports/**/*.xml'
}
@mattstep
mattstep / gist:4504784
Created January 10, 2013 18:59
Jury Duty Checker Script
#!/bin/bash
GROUP_NO=3232
CURRENT_JD_STATUS="$(curl -X POST -d"groupNumber=$GROUP_NO" http://www.sanmateocourt.org/court_divisions/juror_services/jurorstatus.php | grep -A 5 'juryinstructions' | grep msg)"
while(true)
do
PREVIOUS_JD_STATUS=$CURRENT_JD_STATUS
CURRENT_JD_STATUS="$(curl -X POST -d"groupNumber=$GROUP_NO" http://www.sanmateocourt.org/court_divisions/juror_services/jurorstatus.php | grep -A 5 'juryinstructions' | grep msg)"
echo "Current status at " $(date) " is " $CURRENT_JD_STATUS
@mattstep
mattstep / gist:2432309
Created April 20, 2012 22:21
Minecraft maven packaging
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>minecraft</groupId>
<artifactId>minecraft-packaging-experimental</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>minecraft-packaging</name>
<description>Minecraft maven POM</description>
% Jeff Wood - Homework 7
clear all
close all
clc
% ============ PART I ============
@mattstep
mattstep / ATtiny85-ADC-to-PWM.c
Created January 23, 2012 05:10
ADC to PWM using an ATtiny13a for driving a plasma speaker.
#include <avr/io.h>
int main(void)
{
// Setup ADC2 as an input, using an internal voltage reference, with left bit alignment in ADCH|ADCL
ADMUX = (1 << REFS0) | (1 << MUX1) | (1 << ADLAR);
// Enable the ADC, Start the conversion, Autotrigger, and /16 prescale
ADCSRA = (1 << ADEN) | (1 << ADSC) | (1 << ADATE) | (1 << ADPS2);
// Setup fast PWM output on OCB0
checking for a traditional japanese locale... make[8]: Entering directory `/home/ubuntu/openwrt/trunk/build_dir/host/xz-5.0.2/src/liblzma'
/bin/bash ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -O2 -I/home/ubuntu/openwrt/trunk/staging_dir/host/include -pthread -fvisibility=hidden -Wall -Wextra -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2 -I/home/ubuntu/openwrt/trunk/staging_dir/host/include -MT liblzma_la-tuklib_physmem.lo -MD -MP -MF .deps/liblzma_la-tuklib_ph