Skip to content

Instantly share code, notes, and snippets.

View PSingletary's full-sized avatar
🔍
Search

PSingletary PSingletary

🔍
Search
View GitHub Profile
@PSingletary
PSingletary / regex.ts
Created February 20, 2025 11:31 — forked from jeremieflrnt/regex.ts
Ultimate regex specific domain
export const getValidUrlRegex = (domainName?: string) => {
return domainName
? RegExp(
/^(?:https?:\/\/)?(?:www\.)?(?:(?<subdomain>[a-z0-9-]+)\.)?/.source +
RegExp(domainName).source +
/\.(?:(?<tld>[a-z]{1,63}))?(?::(?<port>[0-9]{1,5}))??(?:[/#](?<path>[\w/\-._~:/?#[\]@!$&'()*+,;=.]*)?)?$/
.source,
)
: /^(?:https?:\/\/)?(?:www\.)?(?:(?<subdomain>[a-z0-9-]+)\.)?(?<domain>[a-z0-9-]+)\.(?:(?<tld>[a-z]{1,63}))?(?::(?<port>[0-9]{1,5}))??(?:[/#](?<path>[\w/\-._~:/?#[\]@!$&'()*+,;=.]*)?)?$/;
};
@PSingletary
PSingletary / bsky-annoyances.txt
Created February 14, 2025 06:22 — forked from mary-ext/bsky-annoyances.txt
custom scriptlet for removing Bluesky's annoyances
bsky.app##+js(user-bsky-annoyances.js)
main.bsky.dev##+js(user-bsky-annoyances.js)
@PSingletary
PSingletary / macOS.js
Last active January 10, 2025 13:06
tampermonkey scripts for streamlink
// ==UserScript==
// @name Launch Terminal and Streamlink
// @namespace http://tampermonkey.net/
// @version 0.1
// @description button for twitch that launches terminal and streamlink
// ==/UserScript==
(function() {
'use strict';
@PSingletary
PSingletary / README.md
Created December 28, 2024 12:41 — forked from rondhi/README.md
How to stream games from OBS directly from Steam Deck's Gaming Mode

How to stream games from OBS directly from Steam Deck's Gaming Mode (as of 2023-02-26)

DISCLAIMER: As with any guide, please make sure to read through and understand everything before following the steps in this guide. I'm not responsible for you breaking anything on your own device. This guide assumes you have a little background with the linux command line as well as the text editor nano. If not, please educate yourself


Description: It's possible to stream Vulkan and OpenGL games from Gaming Mode on your Steam Deck. This guide is heavily based on robertkirkman's guide, which is linked multiple times throughout this guide. Much thanks to them


@PSingletary
PSingletary / expand.js
Last active December 21, 2024 13:02
expand account switcher
// ==UserScript==
// @name Bluesky Account Switcher
// @namespace http://tampermonkey.net/
// @version 2024-11-20
// @description Automatically expands account switcher on Bluesky settings page
// @author https://github.com/aliceisjustplaying
// @match https://bsky.app/*
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=bsky.app
// @grant none
@PSingletary
PSingletary / like-bomb.js
Last active December 21, 2024 12:59
bookmarklet to userscript conversion of Like-bomb
// ==UserScript==
// @name 💞💣
// @namespace http://tampermonkey.net/
// @version 2024-12-21
// @description like all loaded posts on bsky.app
// @author https://PSingletary.me
// @license MIT
// @downloadURL https://gist.githubusercontent.com/PSingletary/fdb6e121890e044b6310e8b5fc4039e7/raw/0dd909abbe2f71771a53400fff493ab50887914b/like-bomb.js
// @updateURL https://gist.githubusercontent.com/PSingletary/fdb6e121890e044b6310e8b5fc4039e7/raw/0dd909abbe2f71771a53400fff493ab50887914b/like-bomb.js
// @match https://bsky.app/*
@PSingletary
PSingletary / 0.md
Created December 19, 2024 16:44 — forked from b0o/0.md
Bluesky Starter Pack List Adder

Install UserScript Follow Me

2024-12-18_21-22-05_region_re.mp4
@PSingletary
PSingletary / bsky_user_stats.rb
Created September 7, 2024 19:19 — forked from mackuba/bsky_user_stats.rb
Script to check how much given Bluesky users post daily on average
#!/usr/bin/env ruby
begin
require 'minisky'
rescue LoadError
puts "Install minisky: '[sudo] gem install minisky'"
exit 1
end
require 'time'
@PSingletary
PSingletary / Bootstrap-OBS.ps1
Last active October 19, 2024 17:31
OBS-bootstrapper
# Function to check and install Python
function Install-Python {
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
Write-Output "Python not found. Installing..."
$pythonInstaller = "https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe"
$installerPath = "$env:TEMP\python-installer.exe"
Invoke-WebRequest -Uri $pythonInstaller -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -NoNewWindow -Wait
Remove-Item $installerPath
Write-Output "Python installed."
@PSingletary
PSingletary / chatterino_calling_streamlink.md
Last active August 17, 2024 10:31
Streamlink in chatterino