This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |