Skip to content

Instantly share code, notes, and snippets.

@twilight-sparkle-irl
twilight-sparkle-irl / README.md
Last active July 18, 2020 07:41
renpy monkeypatch bullshit, using CensoredUsername's work

renpy monkeypatching magic
made for DDLC, probably works on other stuff in...ways

requires picklemagic
honestly just download unrpyc and put this all in the un.rpyc folder

by default this

  1. edits any python inline with config.keymap['game_menu'].remove('mouseup_3') in it to have print("Forgery python loaded!") at the top
  2. edits any attempt to set config.developer to anything but True to set it to True
  3. forces every dialogue, as best it can, to be variations on "hello"
@twilight-sparkle-irl
twilight-sparkle-irl / server.py
Created February 14, 2020 21:01
Simple upload/download Flask thing, for when you don't want to set up an FTP server and just want to transfer files back-and-forth real quick.
#!/usr/bin/python3
# THIS IS NOT MEANT TO BE HOSTED FOR PUBLIC USE.
# THIS IS A TESTING TOOL.
# BY DEFAULT, DO NOT USE THIS FOR ANY PURPOSES.
###### REVIEW BOTTOM OF FILE FOR LICENSE! ######
# This file is standalone and only requires Flask be installed.
# Simply run it and it should work out of the box.
# It will create an uploads folder in the current directory by default, but that can be changed in UPLOAD_FOLDER.
import os, secrets
@twilight-sparkle-irl
twilight-sparkle-irl / README.md
Last active April 26, 2024 14:26
import/export ponies

only enable one at a time
this only works on computer. you must have tampermonkey installed on your browser

when ponies dumper is on: open console and type dumpPonies()

when ponies changer is on: open your ponies.txt, copy and paste the large chunk of data next to the pony name (and nothing else, no spaces, etc), open console, type window.ponyInfo = "[CODE STRING]", create a new pony, save it, and then type delete window.ponyInfo;

i cannot guarantee this will work cross server, as pony town has not updated the public domain release despite multiple upgrades it's had, causing other servers to need to make replica features or simply not implement them. if you need extra servers, add a // @match https://[server domain]/* line with the pony.town ones

@twilight-sparkle-irl
twilight-sparkle-irl / .XCompose
Last active February 26, 2022 21:22
.XCompose unicode shenanigans pack
# the unicode shenanigans pack for XCompose, by Twilight (synthetic.garden)
# for when you need obfuscation
# Please use these wisely, using them for everything everywhere is dumb and causes accessibility issues.
# If that for some reason isn't a good enough reason for you: using these excessively will cause them to lose their power.
# Don't be a dumbass.
# breakers
# used to break up text when lookalikes can't be used
@twilight-sparkle-irl
twilight-sparkle-irl / indexy.sh
Last active July 14, 2019 16:27
i went too deep. creates index files for a directory on the drive, and continually updates them
#!/bin/bash
# requires inotify-tools and tree be installed
# --CONFIG--
INDEXDIR="$(pwd)" # change this to where you have the directory you want to index mounted
URL="https://generichost.example/~/person/assets" # change this to where the urls go
TITLE="stuff - %s" # %s represents the current directory
# below is the css to apply to the files. you can touch it if you wanna
# but i'd just recommend replacing the directory listing creator entirely lol
@twilight-sparkle-irl
twilight-sparkle-irl / style_to_obj.js
Last active June 26, 2019 20:16
an exercise in pain and suffering -- getting the set styles as an object from [element].style
// redundant_styles gets all the set styles, including ones that just set children value (text-decoration -> text-decoration-line, for example)
// implied_styles gets all the styles that are set and do not only affect the style by setting other properties
// all_styles gets all styles, unset or not. it's prety useless i just added it because it was possible
// getting the styles without the implied ones is not something i had time to do, it seems that i'd have to do text parsing to achieve that
style_to_obj = {}
if ('CSS2Properties'in window) { // firefox .style
style_to_obj['redundant_styles'] = (x=>Object.fromEntries(Object.keys((x.__proto__)).filter(_=>!_.match(/[A-Z]/g)).map(_=>[_,x.__lookupGetter__(_).bind(x)()]).filter(_=>_[1]!=='')))
style_to_obj['implied_styles'] = (x=>Object.fromEntries([...x].map(_=>[_,x[_]])))
@twilight-sparkle-irl
twilight-sparkle-irl / fuckAprilFools.js
Last active April 1, 2019 08:21
reenable light theme
// i have no clue who the original source for this code was, but originally it enabled developer settings
// i've hacked it so that it sets light theme enabled, even when the april fools experiment is running.
// it might take a moment, but just click into Settings > Appearance and maybe toggle from light to dark to light if it's particularly slow
(async()=>{let r=await new Promise(r=>{let a=[[],{_:(a,b,c)=>r(c)},[["_"]]];typeof webpackJsonp==="object"?webpackJsonp.push(a):webpackJsonp(...a)});delete r.m["_"];delete r.c["_"];for(let i in r.c) {if(r.c.hasOwnProperty(i)){let m=r.c[i].exports;if(m&&(typeof(m)=="object")){if(("getExperimentId" in m)&&m.getExperimentId()==="2019-04_april_fools"){Object.defineProperty(r.c[i].exports,"inExperiment",{get:_=>false,set:_=>_,configurable:true})}else{if(("disableGamesTab" in m)){let g=m.getAllSettings();g.theme="light";m._actionHandlers.USER_SETTINGS_UPDATE({settings:g})}}}}}})()
// it's magic joel, it's magic
@twilight-sparkle-irl
twilight-sparkle-irl / rtpin.js
Last active September 14, 2022 04:17
pin retweets on twitter ----> ----> !! YOU NEED TO BE ON THE OLD LAYOUT, GET GoodTwitter !! <---- <----
$(document).ajaxComplete((e, x, o) => {
if (o.url == "https://api.twitter.com/1.1/statuses/retweet.json") {
tweet_id = JSON.parse(x.responseText)['id_str'];
auth_token = JSON.parse(document.querySelector('#init-data').value)['formAuthenticityToken'];
fetch("https://twitter.com/i/tweet/pin", {
body: `authenticity_token=${auth_token}&id=${tweet_id}`,
method: "POST",
headers: {
Accept: "application/json, text/javascript, */*; q=0.01",
"Cache-Control": "no-cache",
@twilight-sparkle-irl
twilight-sparkle-irl / oof.lua
Last active February 4, 2019 15:46
makes mario oof randomly. a really, really simple test of lua stuff. probably glitchy.
memory.usememorydomain("RDRAM")
math.randomseed(os.time())
local oof = 0
local dew_it = 0
while true do
if math.random() > (0.994 - dew_it) and oof < 1 then
console.log(oof)
memory.write_u32_be(0x33b17c,0x00020460+math.random(0,5))
oof = 200
dew_it = 0
@twilight-sparkle-irl
twilight-sparkle-irl / swipernoswiping.csv
Last active February 3, 2019 20:25
a guide to twitter video download bots
id username
997774805511360512 this_vid
1074360508030074880 thisvid_
1078893871780847618 this_vid_
708564331332444160 GetVideoBot
1010484773066887168 DownloaderBot