Skip to content

Instantly share code, notes, and snippets.

@SethJMoore
SethJMoore / gist:2bb258a956b7a0d971379d3794ab83f2
Created September 7, 2018 19:16
Set the date you want 'new Date()' and 'Date.now()' to return. Barely tested, so don't rely on it without confirming it does what you expect it to do.
const fixedDate = '2018-09-07T23:30:00';
Date = class extends Date {
constructor() {
arguments.length === 0 ?
super(fixedDate) :
super(...arguments);
}
static now() {
return (new Date(fixedDate)).getTime();
@SethJMoore
SethJMoore / add-everyone-to-everyone.js
Created May 18, 2018 20:52
Add all the twitter accounts you follow to a list.
// As of the middle of May, 2018, I was able to use this in Chrome
// to add the 600 something twitter users I follow to a list.
//
// Create a list called "Everyone".
//
// Go to your "Following" list. Scroll down until everyone has loaded.
//
// Scroll back up to the top.
//
// Paste the following into the Chrome DevTools Console and press
@SethJMoore
SethJMoore / CoffeeMug.java
Last active January 17, 2019 17:20
I made up the wakeUp method to paint on a coffee mug. I put the rest of this together to make sure the method would work. Run it at https://repl.it/@SethJMoore/GeneralGrimNewsaggregator
public class CoffeeMug {
public CoffeeMug() {
isEmpty = false;
}
private boolean isEmpty;
public boolean isEmpty() {
return this.isEmpty;
}