Skip to content

Instantly share code, notes, and snippets.

View ecliptik's full-sized avatar
🏠
Working from home

Micheal Waltz ☁️ ecliptik

🏠
Working from home
View GitHub Profile
@ecliptik
ecliptik / pleroma-gen-emoji-pack.sh
Created September 30, 2022 22:04
Genreate emoji pack for Pleroma
#!/bin/sh
#Run within a directory containing emoji to add to Pleroma
#Directoutput to `pack.json`
#Get files
files=$(ls *.png)
numfiles=$(echo ${files} | sed -e "s/ /\n/g" | wc -l | sed -e "s/ //g")
#Prepend JSON header
cat << _EOF
@ecliptik
ecliptik / aisle.txt
Last active January 20, 2022 09:46
Aisle Strings
Resident data ends at 36c4, program starts at 36c4, file ends at 1dd10
Starting analysis pass at address 36c2
End of analysis pass, low address = 36c4, high address = dffc
[Start of code]
Main routine R0001, 0 locals
@ecliptik
ecliptik / aim_notify.pl
Created April 30, 2021 00:26
AIM Alerting Perl Script
#!/usr/local/bin/perl -w
#######################################################################################################
#Name: aim_notify.pl
#Date: 02/21/2006 - mwaltz@ucsd.edu
#Purpose: Send an instant message over AOL to a list of screen names and then sign off.
#Usage: aim_notify.pl "message you want to send"
#Description: This script is for admins who want a server to alert them via AOL IM. A screen name can have message forwarded to a mobile phone number, making it a pager like application.
#Requires: NET::Oscar - http://search.cpan.org/~matthewg/Net-OSCAR-1.925/lib/Net/OSCAR.pm
#######################################################################################################
@ecliptik
ecliptik / docker-compose.yaml
Created March 19, 2021 06:22
OpenVPN and Transmission in docker-compose
version: '3.8'
services:
openvpn:
build:
context: .
dockerfile: Dockerfile.openvpn
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun"
@ecliptik
ecliptik / md2gopher.sh
Last active January 31, 2021 21:38
md2gophermap.sh
#!/bin/bash
#Convert a jekyll markdown post to a gophermap
#Will create a sub-directory with the name of the post and a gophermap
#converted to 70 columns with links. Tries to do basic http or gopher
#linking. May not work well, but works well enough.
# usage: ./md2gophermap.sh ../_posts/post-to-convert.md
#Know Bugs
#Pandoc does not wrap code blocks to the columns length and will get cut
@ecliptik
ecliptik / md2gopher.sh
Last active January 31, 2021 21:37
md2gopher.sh
#!/bin/bash
#Convert a jekyll markdown post to plaintext suitable for gopher,
#converted to 70 columns
#usage: ./md2gopher.sh ../_posts/post-to-convert.md
#Take input and craft output file and directory vars for use later on
input=$1
outdir="_posts"
output="${outdir}/`basename -s .md ${input}`.txt"
@ecliptik
ecliptik / phlogmap.sh
Last active January 31, 2021 21:37
phlogmap.sh
#!/bin/bash
#Create gophermap of last 10 posts
#Originally from: https://johngodlee.github.io/2019/11/20/gopher.html
#Use layout file for header on gophermap
cat _layouts/phlog > gophermap
all=(_posts/*.txt)
@ecliptik
ecliptik / README.md
Last active January 27, 2021 20:02
statefulset label pattern

Tenant IPs

  • tenant IPs are stored in ips.txt
  • These are used to create the number of services and the number of replicas for a statefulset (1 tenantip = 1 pod)

Create Services

  • Running ./update-service.sh a for the first time will create the services
  • The files ips.txt contains the list of clusterIPs to set, which also creates a label and selector
  • Passing an a or b will update the selector to use the pods in group a or b
@ecliptik
ecliptik / Dockerfile
Last active August 18, 2020 00:10
jenv inside Docker container image
#Build and run with a specific version of java within the build image
#eg Java 11: docker build --build-arg JAVA_VERSION=11 -t jenv .
#eg Java 8: docker build --build-arg JAVA_VERSION=1.8 -t jenv .
FROM debian:buster
RUN apt update && apt install -y ca-certificates wget
RUN wget -O- https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz | tar -xz -C /opt/
RUN wget -O- https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u265-b01/OpenJDK8U-jdk_x64_linux_hotspot_8u265b01.tar.gz | tar -xz -C /opt/