Skip to content

Instantly share code, notes, and snippets.

View Ephellon's full-sized avatar

Ephellon Ephellon

View GitHub Profile
@Ephellon
Ephellon / help.js
Created April 25, 2023 15:50
Morning Report - Helpers
// https://codepedia.info/javascript-export-html-table-data-to-excel
// @requires: https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js
let workbook = XLSX.utils.table_to_book(table, { sheet: '<Sheet Name>' });
XLSX.writeFile(workbook, '<Sheet Name>.xlsx');
@Ephellon
Ephellon / README.md
Last active November 18, 2021 08:37
Export HTML tables to Excel

Export HTML tables to Excel

Bookmark this code to run on other sites!

@Ephellon
Ephellon / tweets.js
Created May 28, 2021 01:42
Tweet Search Scraper
// How to - Search for tweets on Twitter. Run the code below. Scroll (click mouse wheel for "auto") as long as needed
/** Tweet Search Scraper - Scrapes Tweets from the search results page: https://twitter.com/search
*
* Function $(query:string[, multiple:boolean[, container:Node]]) -> Array|Node
* # Returns an array or node using `querySelectorAll` or `querySelector` (respectively)
*
* Object Tweets
* // The main object, containing the scraped tweets
* Getter size -> Number
@Ephellon
Ephellon / Salty_Tears.ES6.js
Last active January 1, 2021 03:43
Salty Tears (Dead by Daylight) - Add-on Calculator
var CONVERT_TEXT;
if(CONVERT_TEXT)
clearInterval(CONVERT_TEXT);
CONVERT_TEXT = setInterval(() => {
let $ = (selector, parent = document) => [...parent.querySelectorAll(selector)],
_ = ['common', 'uncommon', 'rare', 'veryrare', 'ultrarare'];
let container;
@Ephellon
Ephellon / uno.js
Created June 8, 2020 00:41
Quick Gist of Uno deck
class Deck {
constructor(...suits) {
let self = [],
uuid = (...values) => values.join('-') + '-' + Math.random().toString(36).replace(/^\d*\./, '').slice(-4),
properties = { configurable: false, enumerable: false, writable: false };
for(let suit of suits) {
// Cards that have 2 copies (suit-oriented)
for(let card of [1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C'])
self.push(
@Ephellon
Ephellon / add-bits.js
Created June 7, 2020 16:08
Simple function for adding an arbitrary number of bits
/** addBits(A, B, S?)
* @param A The first set of bits
{ BigInt | Number | String === /^[01]*$/ | Object == Array }
* @param B The second set of bits
{ BigInt | Number | String === /^[01]*$/ | Object == Array }
* @param S The signature boolean
= true -> Use signed mode (int)
= false -> Use unsigned mode (uint)
* @return String === /^[01]+$/
*/
@Ephellon
Ephellon / README.md
Last active June 7, 2020 16:12
Twitch - Auto-claim Channel Points

Auto-claim Twitch Channel Points

To make this a bookmark, go to Twitch, press Ctrl + D, and for the URL use the code below →

javascript:(()=>{let t=(t,e=document)=>{let i=[...e.querySelectorAll(t)];return i.length>1?{...i,first:i[0],last:i[i.length-1]}:{...i[0],first:i[0],last:i[0]}},e=1e3,i=60*e,n=!0,r=0,s=0,a=0,l=!1,o={get update(){return p.update=setInterval(w,3e3)},get writer(){return p.writer=setInterval(()=>m.innerText,30*e)}},c=t("#auto-community-points").first,u=t('#auto-community-points svg[class*="channelpoints"i], img[class*="channelpoints"i]').first,m=t('#auto-community-points [class$="animated-number"i]').first,p={update:null,writer:null},d={Watching:0,Actively_Watching:0,Earned:{Watching:5,Actively_Watching:15},Oldest:()=>Math.min.apply(null,Object.values(d).filter(t=>+t))},f=t=>null!=t,y=(...t)=>{for(let e of t)clearInterval(p[e])},h=(...t)=>{for(let e of t)o[e]},w=()=>{if(n&&(a=t('#auto-community-points [data-test-selector="community-points-summary"i] 
@Ephellon
Ephellon / readme.md
Last active December 17, 2019 04:44
All Sally Beauty stores

Building the JSON database

/* Go to their website, open a console, and run stores.js */

The layout of the JSON database

/* stores.json */
@Ephellon
Ephellon / shuffle.js
Last active January 4, 2019 08:14
Shuffle.js: An Encoding/Decoding Library (with LZW compression support)
var destruct, construct, roll, unroll, compress, decompress;
/* DO NOT USE for secure projects, there are only 32 possible outputs */
/* The input (de/con)structors */
/** Destructs (attempts to flatten) the input
* @parameter input: the input to flatten
*/
destruct = (input) => {
if(input === undefined || input === null)
@Ephellon
Ephellon / parseURL.js
Last active August 22, 2020 01:44
A better version of `new URL` (or `parseURL`)
function parseURL(url) {
if(url === undefined || url === null)
return {};
var url = url.toString(),
data = url.match(/^((([^:\/?#]+):)?(?:\/{2})?)(?:([^:]+):([^@]+)@)?(([^:\/?#]*)?(?:\:(\d+))?)?([^?#]*)(\?[^#]*)?(#.*)?$/),
i = 0,
e = "";
data = data || e;