Skip to content

Instantly share code, notes, and snippets.

View ElnuDev's full-sized avatar

Elnu ElnuDev

View GitHub Profile
@ElnuDev
ElnuDev / script.js
Created November 23, 2022 04:06
Music-only YouTube homepage
// ==UserScript==
// @name Music-only YouTube homepage
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically switch to the "Music" feed filter on YouTube
// @author ElnuDev
// @match https://www.youtube.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@ElnuDev
ElnuDev / script.js
Last active October 24, 2022 21:20
Habitica Due Default Tampermonkey script. Make sure to run on `document-idle` in settings
// ==UserScript==
// @name Habitica Due Default
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically switch to Due tab in Dailies section
// @author ElnuDev
// @match https://habitica.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=habitica.com
// @grant none
// ==/UserScript==
@ElnuDev
ElnuDev / habitica.css
Last active October 24, 2022 22:55
Habitica Nord theme
/* ==UserStyle==
@name habitica.com
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Habitica Nord Theme
@author ElnuDev
==/UserStyle== */
@-moz-document domain("habitica.com") {
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@ElnuDev
ElnuDev / nextrequest-downloader.js
Created February 20, 2022 23:04
NextRequest Downloader
// ==UserScript==
// @name NextRequest Downloader
// @version 1
// @grant none
// ==/UserScript==
let downloadButton = document.createElement("button");
downloadButton.innerHTML = "Download all";
downloadButton.style.position = "absolute";
downloadButton.style.top = "8px";
@ElnuDev
ElnuDev / slopefield.py
Created November 6, 2021 22:11
Slope field calculator
from math import nan
def slope(x, y, equation):
try:
# Edit this to match the given dy/dx in the problem
return eval(equation)
except ZeroDivisionError:
# Return NaN (Not a Number) for division by zero
return nan
@ElnuDev
ElnuDev / quote_fix.py
Created April 2, 2021 16:32
Replace straight double quotation marks ("") and apostrophes (') with their curly equivelents, “” and ’.
file_path = input("File path: ")
f = open(file_path, 'r+')
original_text = f.read()
text = original_text
# Replace quotations
# https://stackoverflow.com/a/58567848
quote_count = text.count('"')
@ElnuDev
ElnuDev / install-node.sh
Created March 28, 2021 19:49
Install Node.js 14.x on Ubuntu
#!/bin/bash
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install -y nodejs