Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 20:07
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@fitzgen
fitzgen / gist:951178
Created May 2, 2011 04:22
AMD/CommonJS/Browser all around compatibility boiler plate
(typeof define === "function"
? define
: function (_, f) {
if ( typeof exports === "object" ) {
f(exports);
} else {
f(this);
}
})(["exports"], function (exports) {
@fitzgen
fitzgen / gist:1346669
Created November 8, 2011 00:41 — forked from zpao/gist:1346649
diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp
index afa2125..2afdbb8 100644
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -7230,7 +7230,6 @@ dumpValue(const Value &v)
fprintf(stderr, "false");
} else if (v.isMagic()) {
fprintf(stderr, "<invalid");
-#ifdef DEBUG
switch (v.whyMagic()) {
// Load the actor definition.
DebuggerServer.addActors("chrome://global/content/devtools/dbg-profiler-actors.js");
// Define a global-scoped actor
function ProfilerActor(aConnection, aRootActor)
{
this._conn = aConnection;
this._profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler);
this._started = false;
}
ProfilerActor.prototype = {
_discoverScriptsAndSources: function TA__discoverScriptsAndSources() {
let scriptsAdded = [];
for (let s of this.dbg.findScripts()) {
if (!this._allowSource(s.url)) {
continue;
}
scriptsAdded.push(this._addScript(s));
}
Object.defineProperty(window, "sourceMaps", {
get: function () {
delete window.sourceMap;
window.sourceMap = require("source-map");
return window.sourceMap;
}
});
@fitzgen
fitzgen / .mozconfig
Created June 24, 2013 20:12
Basic .mozconfig for hacking on devtools stuff
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_MAKE_FLAGS="-s -j8"
ac_add_options --enable-tests
mk_add_options AUTOCLOBBER=1
# Using ccache will speed up incremental builds a ton.
# See https://developer.mozilla.org/en-US/docs/ccache
# ac_add_options --with-ccache=/usr/local/bin/ccache
# Enable if you ever need to use the gecko profiler
Components.utils.evalInSandbox("" + function one(fn) { two(fn); },
gDebuggee,
"1.8",
"http://example.com/one.js");
@fitzgen
fitzgen / go.js
Created August 30, 2013 20:07
http://swannodette.github.io/2013/08/24/es6-generators-and-csp/ ported to SpiderMonkey (at least until ES6 generators are fully supported, which should be within the next month or so)
function go_(machine, step) {
while(!step.done) {
try {
var arr = step(),
state = arr[0],
value = arr[1];
switch (state) {
case "park":
setImmediate(function() { go_(machine, step); });