Skip to content

Instantly share code, notes, and snippets.

View eiiot's full-sized avatar
👨‍💻

Eliot Hertenstein eiiot

👨‍💻
View GitHub Profile
@eiiot
eiiot / quizlet-scraper.js
Created March 27, 2024 06:24 — forked from nodaguti/quizlet-scraper.js
Quizlet to CSV
/**
* Convert a list on Quizlet into CSV-formatted text.
* Usage:
* i) Copy and paste into your browser's console.
* ii) Run it!
*/
(() => {
const terms = document.querySelectorAll('.SetPageTerms-term');
const csv = [];
@eiiot
eiiot / nextra-remote.md
Last active January 23, 2024 22:09
Nextra Remote Markdown

With Next.js, you can load remote content using next-mdx-remote.

For example, this section of the page was generated using a GitHub Gist as the source.

@eiiot
eiiot / tabroom_titles.user.js
Created October 1, 2023 15:33
Add Tabroom.com Page Titles
// ==UserScript==
// @name Tabroom Headings
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a button to cengage to scroll to the first assignment that's not completed already.
// @author You
// @match https://www.tabroom.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tabroom.com
// @grant none
// ==/UserScript==
@eiiot
eiiot / cengage_scroll.user.js
Created June 25, 2023 03:23
A Userscript to add "Scroll To Latest Assignment" to Cengage
// ==UserScript==
// @name Cengage Scroll
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a button to cengage to scroll to the first assignment that's not completed already.
// @author You
// @match https://ng.cengage.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ng.cengage.com
// @grant none
// ==/UserScript==
@eiiot
eiiot / twitter_improved.user.js
Last active May 15, 2023 22:15
Twitter Improved
// ==UserScript==
// @name Twitter Improved
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Hide tweets with over 5k likes.
// @author eiioth
// @match *://*.twitter.com/home
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
@eiiot
eiiot / tailwind-next-init.sh
Created February 9, 2023 18:13
Quickly initiate TailwindCSS in a Next.js project (no `/app` directory support)
#!/bin/bash
yarn add -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
# replace tailwind.config.js with the following
STRING="/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
\"./pages/**/*.{js,ts,jsx,tsx}\",
\"./components/**/*.{js,ts,jsx,tsx}\",
@eiiot
eiiot / war_room_dark_mode.user.js
Last active February 6, 2023 19:10
War Room Dark Mode
// ==UserScript==
// @name War Room Dark Mode
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds dark mode options to War Room for users on non-chromium browsers
// @author Eliot Hertenstein
// @match https://war.elk.sh/*
// @icon https://emojicdn.elk.sh/%F0%9F%8E%9B%EF%B8%8F
// @grant none
// @run-at document-start
@eiiot
eiiot / rain.gs
Last active January 9, 2023 22:40
Hourly Rain in Google Calendar
Date.prototype.addHours= function(h){
this.setHours(this.getHours()+h);
return this;
}
function updateCalendar() {
let response = UrlFetchApp.fetch('https://api.openweathermap.org/data/2.5/onecall?lat={{YOUR LATITUTE HERE}}&lon={{YOUR LONGITUDE HERE}}&units=imperial&appid={{YOUR API KEY HERE}}')
let weather = JSON.parse(response.getContentText());
@eiiot
eiiot / migrate-wp-user-avatar.php
Created March 26, 2022 05:10
Wordpress - Migrate from User Profile Picture to Simple Local Avatars
<?php
/*
Migrate from User Profile Picture to Simple Local Avatars
Allows sites to easily move away from the WP User Avatar plugin and switch to Simple Local Avatars instead.
Run by invoking with WP CLI like so:
`wp eval-file migrate-wp-user-avatar.php`
Author: Eliot Hertenstein (forked from Philip John)
Author URI: http://eliothertenstein.com
License: GPLv2
Note: I take no responsibility for data loss throught the use of this script. Use at your own risk
@eiiot
eiiot / docker-compose.yml
Created January 1, 2022 20:16
Docker Compose Example YML
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes: