Skip to content

Instantly share code, notes, and snippets.

View churchofthought's full-sized avatar
🪐
Universe simulations and whatnot.

Church of Thought churchofthought

🪐
Universe simulations and whatnot.
View GitHub Profile
@xola139
xola139 / Invalid Host Header NGROK
Created February 19, 2018 19:17
When Invalid Host Header when ngrok tries to connect to Angular or React dev server
When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok.
ngrok http 8080 -host-header="localhost:8080"
ngrok http --host-header=rewrite 8080
@IMcPwn
IMcPwn / delete-all-messages.js
Last active July 12, 2023 19:41 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@gavofyork
gavofyork / web3-gav.js
Created August 17, 2016 20:25
Gav's web3 alterations
import SolidityFunction from 'web3/lib/web3/function';
import Web3 from 'web3';
var isManaged = typeof(window.web3) == "object";
export var web3 = isManaged ? window.web3 : new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
if (web3.eth.accounts.indexOf(web3.eth.defaultAccount) == -1) {
var best = 0;
web3.eth.accounts.forEach(function(a) {
var b = +web3.eth.getBalance(a);