Skip to content

Instantly share code, notes, and snippets.

View FirstWhack's full-sized avatar

Josiah FirstWhack

View GitHub Profile
@FirstWhack
FirstWhack / discord_mass-ban.js
Last active March 5, 2021 04:42
Discord Mass Ban from List
// --- USAGE ---
// - Populate `IDS` list (make a JSON array of the IDs to ban)
let IDS = ['8165...', '8165...', '8165...', '8165...', '8165...'];
// - Populate SERVER_ID
let SERVER_ID = '1234567890';
// - Login to discord web client
// - Run script in F12 console (snippets, or just paste directly into Console)
// --- END USAGE---
// --- EXAMPLE OUTPUT ---
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
getDownload(url, body, params) {
this.query(url, body, params, 'GET').then(resp => {
resp.blob().then(blob => this.blobDownload(blob, resp));
});
}
blobDownload(blob, resp) {
const fileName = (resp.headers.get('Content-Disposition') || '').match(/filename="?(.+[^"])"?/)[1]; // matches `filename="a.b"` or `filename=a.b` as 'a.b'
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
var ReactKonva =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
var React = require('react'),
{ ButtonGroup, Button } = require('react-bootstrap'),
ResultPaging = React.createClass({
displayName: 'ResultPaging',
propTypes: {
page: React.PropTypes.number,
pageSize: React.PropTypes.number,
totalCount: React.PropTypes.number,
changePage: React.PropTypes.func
function template(str, data) {
return str.replace(/\{(.*?)\}/g, function (derp, tag) { return data[tag]; });
}
// ==UserScript==
// @name Stackexchange HTML 5 Youtube Enabler
// @namespace http://your.homepage/
// @version 0.1
// @description Replaces embed tags with iFrames and uses the Youtube Iframe API
// @author jhawins
// @include http://*stackexchange.com/questions/*
// @include http://*stackoverflow.com/questions/*
// @grant none
// ==/UserScript==
@FirstWhack
FirstWhack / autobin.js
Last active August 29, 2015 14:13 — forked from rlemon/autobin.js
// ==UserScript==
// @name SO Chat room gif autobinner
// @author Robert Lemon
// @version 0.0.31
// @namespace
// @description make rooms not suffer gifs
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
(function(global) {
"use strict";
function runCheck(host, cb) {
console.log('Checking for life at ' + host + ' we checked '+ checks + ' times so far');
var checkReq = http.get(host, function(res) {
console.log("Got response: " + res.statusCode);
ret = 'online';
checkReq.clearTimeout();
console.log('Timeout cleared and sending them on their way');
cb(true); // we are solid
}).on('error', function(e) {
console.log('error' + e);
function responseSuccess(data) {
localStorage.setItem('_echo_' + $.mobile.activePage.attr('id'), JSON.stringify(data));
console.info('Stored '+ $.mobile.activePage.attr('id')+ ' response');
}
// Check connection
function checkConnection() {