Skip to content

Instantly share code, notes, and snippets.

View tspspi's full-sized avatar

tspspi

View GitHub Profile
@tspspi
tspspi / LICENSE.md
Created July 28, 2021 16:14
Python access to Gamma vacuum QPC ion pump pressure gauge using Ethernet interface

Copyright (c)2021 Thomas Spielauer. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

@tspspi
tspspi / ebnf.ebnf
Created February 27, 2021 20:58
ISO EBNF productions describing ISO EBNF without alternative syntax
(*
ISO EBNF Syntax
Removed alternative syntax:
definition separator symbol = ´|´ | ´/´ | ´!´;
start option symbol = ´[´ | ´(/´;
end option symbol = ´]´ | ´/)´;
start repeat symbol = ´{´ | ´(:´;
end repeat symbol = ´}´ | ´:)´;
*)
repetition symbol = ´*´;
@tspspi
tspspi / nodered
Created February 29, 2020 13:19
FreeBSD NodeRED rc.d init script
#!/bin/sh
#
# PROVIDE: nodered
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Configuration variables:
#
# Variable Default Description
# ====================================================================================================
@tspspi
tspspi / README.md
Created November 7, 2019 18:36
Fetch or pull all own github repositories

What is this

This is a short script that uses a personal access token from a github account (created via Profile > Settings > Developer Settings > Personal Access Tokens) that fetches a list of all repositories owned by a given user and either clones them into the current directory - or if they exist performs a pull.

The script puts all repositories in directories relative

@tspspi
tspspi / updateTunnel.sh
Created November 1, 2019 10:22
Hurricane electric IPv6 tunnel endpoint dynamic IP update script
#!/bin/sh
# INTERFACE ... Is the public interface to the internet with assigned public IP
# GIFIF ....... The generic routing encapsulating interface
# POPIP ....... IP address of your assigned point of presence (tunnel endpoint)
# STATEFILE ... File that keeps the current "old" IP address
# LOGFILE ..... Logfile into which updates will be written
# TID ......... Tunnel ID (see tunnel configuration page)
# USERID ...... User ID (as registered)
# UPDATEKEY ... See advanced tab of tunnel configuration page
@tspspi
tspspi / SimplePiezoBoardTest.cpp
Created October 14, 2019 13:21
3D printer piezo board leveling Arduino test sketch
/*
Simple test program for 3D printer piezo
bed leveling adapter board described at
https://www.tspi.at/2019/09/11/piezobedlevel.html
(using Arduino IDE and libraries).
This does not provide any I2C connectivity, etc.
and just periodically reads analog samples, dumps
them to the serial port and does some moving average
filtering (as well as using a inductive probe as
@tspspi
tspspi / Makefile
Created October 8, 2019 08:12
Simple JPEG image I/O example with libjpeg (nearly no proper error handling)
main: main.c filter_greyscale.c imagefile.c simple_imageio.h
clang -DDEBUG -o main -Wall -ansi -std=c99 -pedantic -Werror main.c filter_greyscale.c imagefile.c -ljpeg
@tspspi
tspspi / howto.md
Last active March 10, 2019 14:22
How to use avr-gcc and avrdude with Arduino Pro-Mini on FreeBSD

How to use AVR-GCC and avrdude with Arduino pro-mini on FreeBSD

Required packages / ports

devel/avr-gcc
devel/avr-binutils
devel/avrdude
@tspspi
tspspi / krb5renew.sh
Created March 8, 2019 10:41
Kerberos ticket renewal for all cache files on a machine
#!/bin/sh
# This script automatically renews renewable tickets
# of all users on a given machine (to prevent timeout
# for long running tasks of logged in users).
# It also removes expires tickets from cache files
: ${RENEWAL_THREASHOLD:=3600}
: ${VERBOSE:=0}
: ${LOGFILE:=/var/log/krb5renew.log}
@tspspi
tspspi / usbmodeswitch.sh
Created November 21, 2018 10:55
FreeBSD rc.d init script for sysutils/usb_modeswitch with Huawei Modem
#!/bin/sh
# PROVIDE: usbmodeswitch
# REQUIRE: FILESYSTEMS
# BEFORE: ppp
# usb modeswitch script for huawei modem
# with sysutils/usb_modeswitch
. /etc/rc.subr