Skip to content

Instantly share code, notes, and snippets.

View rufo's full-sized avatar

Rufo Sanchez rufo

  • Minneapolis, MN
View GitHub Profile
@Kowalski7
Kowalski7 / knulli_tailscale_installer.sh
Last active May 21, 2025 15:54
An easy to use installer for Tailscale on portable game consoles running Knulli OS.
#!/bin/bash
SCRIPT_VERSION="1.3"
INSTALL_DIR="/userdata/system/tailscale"
UA_STRING="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0"
# Function to check device compatibility
function device_check {
# Get OS_NAME variable from /etc/os-release
local os_name=$(grep "^OS_NAME" /etc/os-release | awk -F'=' '{print $2}' | tr -d '"')
@Kenny-MWI
Kenny-MWI / slack_tweaks.md
Last active April 30, 2025 06:34
Slack Tweaks

Slack Tweaks

In Fall 2023, Slack introduced an updated client with some unpopular UI changes. The tweaks in this document can be used to revert to the old client or hide the new side bar. These will reset every time you fully close Slack but they are easy to re-apply once you get the hang of it.

(Cross Platform) Open Dev Tools [Preferred Option]

To run any of these scripts, you'll need to open the Dev Tools (or Console). You can do this by typing /slackdevtools in a Slack channel or direct message. These are the same Dev Tools you'd get in Chrome if you hit F12. Along the top are tabs for Elements, Console, Sources, Network, etc. You'll want to paste these scripts into the Console tab at the > prompt.

If Slack disables this command, then you can open Dev Tools by setting a system-wide environment variable and using a keyboard shortcut to open the console. If /slackdevtools worked for you then you can skip these next two sections.

(Mac OS) Enable Dev Mode

@archeYR
archeYR / 8bitdofirmwarelinux.md
Last active June 21, 2025 00:49
8BitDo Firmware Updater in Wine

This is about running 8BitDo's Firmware Update tool for Windows in Wine. It can be used for updating newer 8BitDo devices that may not be supported by fwupd on Linux.

This tool needs Segoe UI Symbol font, on Arch this font is provided by ttf-ms-win10-auto package. For other distributions there is install script.

You will have to let Wine access device's HID interface for updating the firmware. Most importantly it should be a boot HID interface (exposed when device is in bootloader mode, often referred to as "manual update mode" or "advanced mode"). It is also worth adding the Product IDs for HID interfaces that are exposed under different conditions (for example, Ultimate Bluetooth Controller's receiver exposes a HID interface when controller is not connected), so the upgrade tool can detect it and automatically put it in bootloader mode for upgrading the firmware. You can use lsusb to

@chockenberry
chockenberry / ql.sh
Last active March 4, 2024 23:40
QuickLook for macOS shell
#!/bin/sh
# usage:
# ql /tmp/file.jpg
# cat /tmp/file.jpg | ql
# cal -h | ql
if [ -z "$*" ]; then
cat > /tmp/ql.stdin
mime_type=$(file --brief --mime-type /tmp/ql.stdin)
@rkkoszewski
rkkoszewski / gist:aa531cee7126edf329b76bdd0546f502
Last active December 31, 2024 12:32
Notes for installing XorgXrdp and Xrdp with GLAMOR support
THIS ARE MY NOTES OF BUILDING AN INSTALLING XORGXRDP AND XRDP WITH GPU ACCELERATION
TESTED ON DEBIAN 9.13
-- Build XorgXrdp with GPU acceleration ("script" - to be adjusted to your needs) : --
## << BUILD AND INSTALL SCRIPT START >> ##
#!/bin/bash
# Install Latest XRDP with XORGXRDP
# README
@bakman2
bakman2 / octoprint.md
Last active September 19, 2024 21:01
Octoprint IP Camera

How to use Octoprint with an IP camera that has an RTSP stream available

Optional: For Wyze cam only

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue. Set video bitrate to 1500, VBR, 30fps.

Installation

@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@dctucker
dctucker / mark_read.sh
Created April 19, 2018 23:13
This uses the GitHub API to mark notifications as read if they meet a certain criteria (closed/merged/OoO/Backport/etc)
#!/bin/bash
mark_read() {
id=$1
curl -H "$CURLH" -s -X PATCH $API/notifications/threads/$id
}
CURLH="Authorization: token $GITHUB_TOKEN"
API=https://api.github.com
@JohnSundell
JohnSundell / CrossPlatformImages.swift
Last active January 5, 2025 10:16
An easy way to make code that uses UIImage cross-platform between iOS/tvOS & macOS
// Either put this in a separate file that you only include in your macOS target
// or wrap the code in #if os(macOS) / #endif
import Cocoa
// Step 1: Typealias UIImage to NSImage
typealias UIImage = NSImage
// Step 2: You might want to add these APIs that UIImage has but NSImage doesn't.
extension NSImage {
@AlexanderWillner
AlexanderWillner / things.sh
Last active September 15, 2023 07:29 — forked from avdgaag/things.sh
Command-line read-only interface to your local Things database of to do items.
Moved to https://github.com/alexanderwillner/things.sh/