Skip to content

Instantly share code, notes, and snippets.

View Ratismal's full-sized avatar

stupid cat Ratismal

View GitHub Profile
@Ratismal
Ratismal / 0_readme.md
Last active September 8, 2021 17:58
A function that will scan through an object to find a specific term. Made for investigating datalayers.

Object Scanner

A function that will scan through an object to find a specific term or value. It searches recursively, and ignores duplicate objects along a path.

This function was made for performing datalayer explorations. It's not a perfect solution, as it cannot call functions or find locally scoped values.

Usage

Copy 1_object_scanner.min.js and paste it onto desired page. Run the function searchForTerm(term, options). See object_scanner.js for usage information.

// ==UserScript==
// @name Adam Sandler
// @namespace https://stupidcat.me/adam_sandler.user.js
// @version 0.1
// @updateURL https://stupidcat.me/adam_sandler.user.js
// @downloadURL https://stupidcat.me/adam_sandler.user.js
// @description adam sandler
// @author stupid cat
// @include *
// @grant none
@Ratismal
Ratismal / hasteflake.js
Last active August 7, 2019 22:34
converts a snowflake into a hastebin-like token
const data = [
"12345",
"12346",
"22346",
"21345"
]
const output = [];
const consonants = [
@Ratismal
Ratismal / animalcrossing.md
Last active May 5, 2019 22:52
so, i revisited my super old animal crossing: new leaf village, and...

So, I revisited my super old Animal Crossing: New Leaf village...

wow!

wow

i need better clothes

thats better

Today on Stupid Cat's Adventures in DMS

oof oof oof

{
"signature": "b7d9a6171b3a3ea8e8ca4104125ad33a7f909f66b4fab7b86fa005b3657a1208",
"payload": {
"cc": {
"lastowo": {
"content": "{func;ns;\r\n {params;0} {params;1}{if;{params;0};!=;1;s}\r\n}\r\n{func;diff;{void;\r\n {set;~r;}\r\n {if;{params};<;60;{set;~r;{func.ns;{params};second}};\r\n {if;{params};<;3600;\r\n {set;~r;{func.ns;{floor;{math;/;{params};60}};minute}};\r\n {if;{params};<;86400;\r\n {set;~r;{func.ns;{floor;{math;/;{params};3600}};hour}};\r\n {set;~r;{func.ns;{floor;{math;/;{params};86400}};day}}\r\n }\r\n }\r\n }\r\n }{get;~r}\r\n}\r\n{switch;{lower;{args;0}};\r\n recent;\r\n{set;~out;[]}\r\n{for;~i;0;<;{length;{get;_lastowos-diff}};\r\n{push;~out;{set;~u;{get;_lastowos-user;{get;~i}}}{space}- {func.diff;{get;_lastowos-diff;{get;~i}}} broken by **{username;{get;~u}}#{userdiscrim;{get;~u}}**}{reverse;{get;~out}}\r\n}**Last {length;{get;_lastowos-diff}} Streaks Broken**\r\n{join;~out;{newline}}{return};\r\n top;\r\n {set;~i;0}\r\n {
@Ratismal
Ratismal / sliders.css
Last active March 16, 2017 22:49
Member list slider for the discord client
/**
* Member List Stuff
**/
.channel-members-wrap {
position: absolute !important;
right: -150px;
height: 100%;
transition: 2s;
margin-left: 100%;
@Ratismal
Ratismal / awaitMessages.js
Last active June 30, 2019 15:45
A simple method to handle awaiting messages
/*
* The premise of a message-awaiter is simple. You need the following:
* 1. An object to store messages
* 2. A function to populate the object
* 3. A hook to check this object
*
* DISCLAIMER: This gist is untested and should only be looked at for learning purposes.
* Please do not directly copy/paste it into your production environment.
*/
/**
* This module provides a function `distortImage` that takes a URL of an image and distorts it.
* Returns a promise containing a buffer.
*
* For dependencies, you need
* 1. The ImageMagick binary (https://www.imagemagick.org/script/download.php)
* 2. The GraphicsMagick JS library (https://github.com/aheckmann/gm)
* - `npm i gm`
* 3. The Jimp library (https://github.com/oliver-moran/jimp)
* - `npm i jimp`