Skip to content

Instantly share code, notes, and snippets.

View Killeroid's full-sized avatar

Kwaku Yeboah-Antwi Killeroid

View GitHub Profile
@magno32
magno32 / Lanterna3 Thread Example.java
Last active August 29, 2015 14:13
Example of threading in Lanterna 3.
package lanternaexample;
import com.googlecode.lanterna.TextColor;
import com.googlecode.lanterna.gui2.BasicWindow;
import com.googlecode.lanterna.gui2.DefaultWindowTextGUI;
import com.googlecode.lanterna.gui2.EmptySpace;
import com.googlecode.lanterna.gui2.Label;
import com.googlecode.lanterna.gui2.StackedModalWindowManager;
import com.googlecode.lanterna.gui2.TextGUI;
import com.googlecode.lanterna.gui2.Window;
@CAFxX
CAFxX / persistent_pipes_linux.md
Last active September 2, 2024 12:08
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

@htp
htp / curl-websocket.sh
Last active May 28, 2025 02:24
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@CodyKochmann
CodyKochmann / install_StaSh.py
Created September 25, 2016 20:22
install StaSh on pythonista for iOS to get pip working
# from https://forum.omz-software.com/topic/1919/stash-shell-like-an-expert-in-pythonista
# this script will get pip working on iOS!
import requests as r
exec(r.get('http://bit.ly/get-stash').text)
@peteryates
peteryates / guide.md
Last active March 6, 2025 19:18
How to stop adverts appearing on your Samsung TV

I'm getting adverts in my TV's UI, help!

Samsung's otherwise excellent 2016 range of UHD TVs received an update that added advertisements to the UI. This has been complained about at great length on Samsung's forums and repeatedly, Samsung have refused to add an option to remove them.

The ads interrupt the clean UI of the TV and are invasive. Here's an example of how they look:

one two

This guide was originally posted on Samsung's TV forums but unfortunately, that site is a super-slow and barely accessible unusable mess.

@psteinroe
psteinroe / parse-olm.py
Last active November 27, 2024 15:33
Convert olm to csv
import zipfile
from lxml import etree
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import pandas as pd
import datetime
def load_attachment(zip, name):
fh = zip.open(name)