Skip to content

Instantly share code, notes, and snippets.

View bellydrum's full-sized avatar
🌸

David Maness bellydrum

🌸
  • Saint Louis, MO
View GitHub Profile
@bellydrum
bellydrum / famiboards-util.js
Last active November 18, 2024 19:57
Famiboards Browser Utility
// ==UserScript==
// @name Famiboards Browser Utility
// @namespace http://tampermonkey.net/
// @version 2024-10-16
// @description Toggle on/off various browser tools for a custom Famiboards experience.
// @author bellydrum
// @match https://famiboards.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @require https://gist.githubusercontent.com/bellydrum/cfc7869243b4d5c4e7ae710ea59edf67/raw/e8be38fc17877c38601edd818fc07c5502173b94/cookieHelper.js
@bellydrum
bellydrum / Babel 7.8.0 easy setup
Last active September 18, 2023 15:14
Since some applications will apparently need to support IE until the end of time, here's an easy way to do so while continuing to write modern Javascript.
{
"scripts": {
"transpile": "./node_modules/.bin/babel src/ --out-dir public/"
},
"babel": {
"presets": [
"@babel/preset-env"
]
},
"devDependencies": {
@bellydrum
bellydrum / app.es6
Last active December 10, 2019 23:51
Modular application object
/**
* An all-purpose Javascript object for general and specific application functionality.
*
* The app object is intended to be defined only once and stored in the browser cache.
*
* @note Documented using a variant of JSDoc standards.
* @see https://devdocs.io/jsdoc/
* @see https://devhints.io/jsdoc
*
* @version 1.1.0
@bellydrum
bellydrum / replace_reddit_comments.py
Last active October 25, 2019 18:58
Replace all of your reddit comments with a customized text.
"""""""""""""""
ABOUT THIS SCRIPT
- here's an easy way to gain access to your reddit account from the python shell using the praw library.
-praw is a python library for accessing reddit.
- https://praw.readthedocs.io/
- written by /u/b3llydrum
- https://github.com/bellydrum
"""""""""""""""
"""""""""""""""
HOW TO USE THIS SCRIPT
@bellydrum
bellydrum / unselectable.css
Last active October 15, 2019 00:03
Make text unselectable - CSS
.unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@bellydrum
bellydrum / logger.pm
Last active September 5, 2019 21:47
Just a quick logjob
# TODO -- delete when done using
use Path::Tiny;
my $dir = path("/home/dmaness");
my $file = $dir->child(".test_file");
# TODO -- delete when done using
# append to existing log -- no need to close
$file->append( "write stuff here!" );
@bellydrum
bellydrum / clickBotChecker.js
Last active March 18, 2019 17:56
Checks if a bot is auto-clicking a specified DOM element.
/**
* clickBotChecker.js
* ------------------------------------------------------------------------------
* ABOUT:
* clickBotChecker.userIsBot() returns true if it thinks a bot is clicking your specified DOM element.
* METHOD
* .userIsBot() does the following to determine auto-clicking behavior:
* 1. Store the timestamp of every n clicks for analysis
* 2. Once three timestamps have been stored, every n clicks, find the absolute value of the difference between:
* a. ( (the average of the last three timestamps) * 3 )
@bellydrum
bellydrum / cookieHelper.js
Last active November 18, 2024 18:51
Cookie Monster v1.1.1
/**
* cookieHelper.js
* ------------------------------------------------------------------------------
* allows handling of cookies in an object-oriented manner.
* written by bellydrum
* https://gist.github.com/bellydrum/cfc7869243b4d5c4e7ae710ea59edf67
*/
class CookieHelper {
@bellydrum
bellydrum / ajaxHelper.js
Last active March 27, 2019 18:47
Ajax Wrapper
/**
* ajaxHelper.js
* written by bellydrum to make ajax even easier
* ------------------------------------------------------------------------------
* @param url (string) - url from which to request data
* @param requestType (string) - type of request
* @param data (optional: object) - data required to make request
* @returns
* - success: {Promise<*>}
* - failure: error