Skip to content

Instantly share code, notes, and snippets.

View Scoder12's full-sized avatar

Spencer Pogorzelski Scoder12

View GitHub Profile
@Scoder12
Scoder12 / neofetch.log
Created June 4, 2021 18:26
Neofetch log
+ verbose=on
+ shift
+ [[ -n --ascii ]]
+ case $1 in
+ image_backend=ascii
+ case $2 in
+ image_source=ascii.txt
+ shift
+ [[ -n ascii.txt ]]
+ case $1 in
@Scoder12
Scoder12 / json2nix.py
Last active March 24, 2024 22:19
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@Scoder12
Scoder12 / main.go
Created March 31, 2021 21:38
Fuse test
package main
import (
"context"
"flag"
"log"
"syscall"
"github.com/hanwen/go-fuse/v2/fs"
"github.com/hanwen/go-fuse/v2/fuse"
@Scoder12
Scoder12 / fangeo.js
Created March 16, 2021 20:44
Fantasy geopolitics leaderboard compositor. Finds top scoring countries and displays their owner names.
/**
* @author Scoder12 <https://scoder12.ml>
* @description A script to combine multiple fanschool data sources into one table.
* Finds top scoring countries and displays their owner names.
* Useful for finding high-scoring, untaken countries.
* API responses are cached as api_<endpoint> keys on window so that re-running the
* script will not re-request the data.
* @url https://app.fanschool.org/
* @license AGPL-3.0-or-later
* @tutorial Open your fasnschool dashboard and paste this script into the console.
@Scoder12
Scoder12 / SimpleDiscordCrypt.plugin.js
Last active May 5, 2022 17:15
Simple Discord Crypt BetterDiscord Plugin
//META{"name":"SimpleDiscordCrypt","source":"https://github.com/Scoder12/RepoTBD","website":"https://scoder12.ml","authorId":"339943808584384512"}*//
/*@cc_on
@if (@_jscript)
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
shell.Popup("It looks like you've mistakenly tried to run me directly. \\n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
@Scoder12
Scoder12 / simplediscordcrypt.js
Created February 11, 2021 19:08
Use simplediscordcrypt in web console or on discord
(function fixLocalStorage() {
// https://stackoverflow.com/a/53773662/9196137
// If we create an <iframe> and connect it to our document, its
// contentWindow property will return a new Window object with
// a freshly created `localStorage` property. Once we obtain the
// property descriptor, we can disconnect the <iframe> and let it
// be collected — the getter function itself doesn’t depend on
// anything from its origin realm to work**.
function getLocalStoragePropertyDescriptor() {
@Scoder12
Scoder12 / exploit.py
Last active November 28, 2020 01:44
Solution to a printf format string vulnerability PWN challenge from https://johnhammond.org/discord
#!/usr/bin/env python3
# Solution to PWN challenge from Solution to a PWN challenge from https://johnhammond.org/discord
# Binary: printing_you_x64 https://cdn.discordapp.com/attachments/762701400790401044/767773607828652062/printing_you_x64
# Author: Scoder12
# Date: 10/13/20
# License: GNU AFFERO GENERAL PUBLIC LICENSE https://www.gnu.org/licenses/agpl-3.0.txt
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@Scoder12
Scoder12 / refactor.py
Last active October 15, 2020 16:38
Poor man's go field refactoring tool
#!/usr/bin/env python3
import sys
if len(sys.argv) < 4:
print(
f"Usage: {sys.argv[0]} <Struct type name (no star)> <field name> <field type>"
)
sys.exit(1)
try:
@Scoder12
Scoder12 / .aliases
Created August 4, 2020 01:05
My shell aliases file
alias "cd.."="cd .."
alias lsa="ls -a"
# For when ubuntu doesn't want to let me use my headphones
alias afr="sudo alsa force-reload"
# taken from the ubuntu default .bashrc
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias notify="alert"
alias gc="git commit -am" # Usage: gc "My commit message"
alias gs="git status"
alias gp="git push"
@Scoder12
Scoder12 / keybase.md
Created May 15, 2020 21:54
keybase.md

Keybase proof

I hereby claim:

  • I am scoder12 on github.
  • I am scoder12 (https://keybase.io/scoder12) on keybase.
  • I have a public key ASBAo0vdjGipfomxhMvhOz09gLBkq-f3ktyfepPCHppioAo

To claim this, I am signing this object: