Skip to content

Instantly share code, notes, and snippets.

View PSingletary's full-sized avatar
🔍
Search

PSingletary PSingletary

🔍
Search
View GitHub Profile
@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 / delete-follow-orphans.ts
Created June 14, 2024 13:32 — forked from mary-ext/delete-follow-orphans.ts
bluesky delete orphaned follows
import { Agent } from '@externdefs/bluesky-client/agent';
import type { Records, RefOf } from '@externdefs/bluesky-client/atp-schema';
const BSKY_USERNAME = '';
const BSKY_PASSWORD = '';
const agent = new Agent({ serviceUri: 'https://bsky.social' });
await agent.login({ identifier: BSKY_USERNAME, password: BSKY_PASSWORD });
const did = agent.session!.did;
@PSingletary
PSingletary / obs_twitch_chat.css
Created November 10, 2023 23:11 — forked from Bluscream/obs_twitch_chat.css
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Just set the URL as https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
And paste this entire file into the CSS box
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
General Settings
*/
body {
color: #FFFFFF!important;
@PSingletary
PSingletary / big-league-me.ts
Created September 30, 2023 14:57 — forked from nuklearfiziks/big-league-me.ts
big-league-me.ts
import dotenv from 'dotenv'
import { BskyAgent } from '@atproto/api'
import { ProfileView } from '@atproto/api/dist/client/types/app/bsky/actor/defs'
const bigLeagueMe = async () => {
dotenv.config()
// YOUR bluesky handle
// Ex: user.bsky.social
const handle = process.env.BSKYHANDLE || ''
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*
@PSingletary
PSingletary / markdown-text-101.md
Created March 16, 2023 00:18 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@PSingletary
PSingletary / synology-import-ssl.sh
Created April 22, 2022 18:11 — forked from Nepherte/synology-import-ssl.sh
Script to import an SSL certificate into a Synology NAS.
#!/usr/bin/env bash
# The id of the certificate to install.
CERT_ID="$1"
# The packages whose certificate to replace.
CERT_PKGS="${@:2}"
# The directory that holds to certificate to import.
CERT_IMPORT_DIR="/tmp/certificate/$CERT_ID"
@PSingletary
PSingletary / twitch-recorder.py
Created February 11, 2022 09:33 — forked from junian/twitch-recorder.py
Record Twitch Streams Automatically in Python
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
import requests
import os
import time
import json
import sys
import subprocess
@PSingletary
PSingletary / profile.ps1
Created August 4, 2021 11:32 — forked from SteveL-MSFT/profile.ps1
PowerShell Prompt
#Requires -Version 7
# Version 1.2.10
# check if newer version
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {
@PSingletary
PSingletary / Get-ADUserAudit.ps1
Created February 7, 2021 04:49 — forked from jdhitsolutions/Get-ADUserAudit.ps1
A PowerShell function and format file for getting Active Directory user management events from the security event logs on domain controllers.
#requires -version 5.1
#requires -module ActiveDirectory
#you might need to increase the size of the Security eventlog
# limit-eventlog -LogName security -ComputerName dom2,dom1 -MaximumSize 1024MB
Function Get-ADUserAudit {
[cmdletbinding()]
Param(
[Parameter(Position=0,HelpMessage = "Specify one or more domain controllers to query.")]