Skip to content

Instantly share code, notes, and snippets.

View shmup's full-sized avatar
🐌

Jared Miller shmup

🐌
View GitHub Profile
@shmup
shmup / torrents.md
Last active July 5, 2025 22:03
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@shmup
shmup / proton
Created December 7, 2023 19:41
easily run an .exe with proton on linux
#!/usr/bin/env bash
# This script launches a Windows executable using Proton within a Linux environment.
# It requires exactly one argument: the path to the executable to run.
# It sets up a separate Proton prefix for each executable to avoid conflicts.
# Usage: proton <path-to-executable>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable-path>"
exit 1

XScreenSaver: Simplified Guide

What Is XScreenSaver?

XScreenSaver is a collection of screen savers for X Window System. Each "module" is a standalone program that renders graphics to a window created by the XScreenSaver daemon.

Basic Approach

  1. Any program can be a screensaver if it can draw on a window it didn't create
  2. You must use C (not C++) because other languages typically can't draw to external windows
  3. XScreenSaver provides utility functions to make development easier

Elixir Primer

Core Concepts

  • Functional language built on Erlang VM (BEAM)
  • Immutable data - values never change
  • Pattern matching as primary control flow
  • Process-oriented concurrency (not OS threads)
Import-Module posh-git
Import-Module PSFzf
# Set initial directory
cd "$HOME\workspace\repos\UI"
# Git aliases
Set-Alias -Name g -Value git
Remove-Item alias:gc -Force -ErrorAction SilentlyContinue
function gs { git status $args }
@shmup
shmup / movewindow.ahk
Last active March 12, 2025 19:47
ahk scripts i use at work
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
padding := 20
; half screens
^#h::WinMove, A, , padding, padding, (A_ScreenWidth/2)-(padding*1.5), A_ScreenHeight-(padding*2)
^#j::WinMove, A, , padding, (A_ScreenHeight/2)+padding, A_ScreenWidth-(padding*2), (A_ScreenHeight/2)-(padding*2)
^#k::WinMove, A, , padding, padding, A_ScreenWidth-(padding*2), (A_ScreenHeight/2)-(padding*2)
@shmup
shmup / workspace.ahk
Last active March 10, 2025 15:35
like i3, mod+n goes to the appropriate workspace (if exists)
; AHK v2 script
SetWorkingDir(A_ScriptDir)
; https://github.com/Ciantic/VirtualDesktopAccessor
VDA_PATH := A_ScriptDir . "\VirtualDesktopAccessor.dll"
hVirtualDesktopAccessor := DllCall("LoadLibrary", "Str", VDA_PATH, "Ptr")
GoToDesktopNumberProc := DllCall("GetProcAddress", "Ptr", hVirtualDesktopAccessor, "AStr", "GoToDesktopNumber", "Ptr")
GoToDesktopNumber(num) {
@shmup
shmup / vpet.c
Last active January 21, 2025 18:32
gcc -o vpets vpets.c -lX11 -lXext
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main() {
#!/usr/bin/env python3
from flask import Flask, request, redirect, url_for
from markupsafe import escape
import re
import json
import atexit
from urllib.parse import urlparse
app = Flask(__name__)