Skip to content

Instantly share code, notes, and snippets.

View WillNilges's full-sized avatar
👾
Probably thinking about aliens

Willard Nilges WillNilges

👾
Probably thinking about aliens
View GitHub Profile
@WillNilges
WillNilges / delete_slack_bot_message_range.py
Created December 10, 2023 04:14
Python script to delete a range of messages from a slack bot, using its token
import argparse
from botocore import os
from dotenv import load_dotenv
import slack_sdk
from slack_sdk.errors import SlackApiError
def delete_messages(token, channel_id, start_ts, end_ts, inclusive=False):
client = slack_sdk.WebClient(token=token)
@WillNilges
WillNilges / CG-firmware-right.ino
Created April 17, 2023 14:35
Config for Right ClearGauntlets
/*
* File Name: lucidgloves-firmware.ino
* LucidGloves Firmware Version 4
* Author: Lucas_VRTech - LucidVR
* lucidvrtech.com
*/
#include "ConfigUtils.h"
#include "AdvancedConfig.h"
@WillNilges
WillNilges / CG-firmware-left.ino
Created April 17, 2023 14:34
Config for left ClearGauntlets
/*
* File Name: lucidgloves-firmware.ino
* LucidGloves Firmware Version 4
* Author: Lucas_VRTech - LucidVR
* lucidvrtech.com
*/
#include "ConfigUtils.h"
#include "AdvancedConfig.h"
@WillNilges
WillNilges / run_matlab.sh
Last active September 1, 2022 21:17
How 2 run matlab w/o installing it :)
#!/bin/bash
# Put this script in a directory _somewhere._ I'm using `/home/wilnil/Documents/4-2-RIT/CMPE 480/matlab_dingus/`
# To run this, cd into your `matlab_dingus` directory, and then `./run_matlab.sh`
# Oh, you'll also need podman installed.
MATLAB_DINGUS="$PWD" # Wherever you store your matlab files
xauth_path=/tmp/matthew-xauth # Where on the host you want to copy your xauth
@WillNilges
WillNilges / example.m
Created March 11, 2022 23:37
Matlab is a bad product that doesn't function.
bb=[1,-2,2,-1]; %filter coefficients
ww=linspace(-1,1,250); % frequency grid (normalized)
HH = freqz(bb,1,ww*pi); % frequency response
% Show results in one figure
subplot(211); % select top subfigure
plot(ww,abs(HH)); % generate plot
ylabel('Magnitude') % y axis label
xlabel('Freq [\times \pi]') % x axis label
grid % this adds a grid
@WillNilges
WillNilges / KeilMDK5.md
Created January 11, 2022 16:32
How to install Keil MDK 5 on Arch Linux
@WillNilges
WillNilges / switcharoo.md
Last active December 6, 2021 21:05
A couple of unorganized notes on how to migrate thingsboard DBs
@WillNilges
WillNilges / startover.sh
Created October 29, 2020 23:48
Nuke OKD4 service node and reinstall.
#!/bin/bash
cd /root
rm -rf /var/www/html/okd4/*
rm -rf /root/install_dir/*
cp /root/install-config.yaml install_dir
openshift-install create manifests --dir=install_dir/
openshift-install create ignition-configs --dir=install_dir/
sudo cp -R install_dir/* /var/www/html/okd4/
sudo chown -R apache: /var/www/html/
sudo chmod -R 755 /var/www/html/
@WillNilges
WillNilges / create-pv.sh
Last active November 11, 2020 14:52
Simple script to set up an nfs pv on OKD4
#!/bin/bash
# Args: $1 - PV name
# $2 - Storage qty
# $3 - NFS server path
# The NFS Share path is hardcoded, so be sure that's where you want it!
mkdir /var/nfsshare/$1
chmod 777 /var/nfsshare/$1
==> Docker <==
-- Logs begin at Wed 2020-11-04 14:31:59 UTC, end at Wed 2020-11-04 15:17:03 UTC. --
Nov 04 14:47:28 minikube dockerd[381]: time="2020-11-04T14:47:28.454381299Z" level=warning msg="Error getting v2 registry: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Nov 04 14:47:28 minikube dockerd[381]: time="2020-11-04T14:47:28.454566995Z" level=info msg="Attempting next endpoint for pull after error: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Nov 04 14:47:28 minikube dockerd[381]: time="2020-11-04T14:47:28.454782697Z" level=error msg="Handler for POST /v1.40/images/create returned error: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Nov 04 14:47:33 minikube dockerd[381]: time="2020-11-04T14:47:33.456085078Z" leve