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
// --- 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 --- |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
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 { |
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
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]) |
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
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 |
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
function template(str, data) { | |
return str.replace(/\{(.*?)\}/g, function (derp, tag) { return data[tag]; }); | |
} |
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
// ==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== |
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
// ==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"; |
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
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); |
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
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() { |
NewerOlder