Skip to content

Instantly share code, notes, and snippets.

@FirehawkV21
FirehawkV21 / rpg_core.js
Last active April 26, 2024 23:08
Optimized Core (Requires Pixi.js 4.8.9)
//=============================================================================
// rpg_core.js v1.6.2
//=============================================================================
//-----------------------------------------------------------------------------
/**
* This is not a class, but contains some methods that will be added to the
* standard Javascript objects.
*
* @class JsExtensions
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 23:08
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

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
// ==UserScript==
// @name userChromeJS Manager
// @include main
// @author xiaoxiaoflood
// @onlyonce
// ==/UserScript==
// original: https://github.com/alice0775/userChrome.js/blob/master/rebuild_userChrome.uc.xul
(function () {
@juliandescottes
juliandescottes / gist:d04ceceb03fbbe0164a3
Last active April 26, 2024 23:04
Sort on string keys
var people = [
{name : "Zoe", age : 20},
{name : "Alicia", age : 18},
{name : "John", age : 22}
];
people.sort(function (p1, p2) {
return p1.name.localeCompare(p2.name);
});
@juliandescottes
juliandescottes / gist:7f95e3056a035fe308c9
Created May 11, 2015 20:59
Mozilla locales are in /toolkit (even devtools ones)
eg \toolkit\locales\en-US\chrome\global\devtools\styleinspector.properties
[[1,2],[3,4],[5,6]].reduce(function (previous, n) {
return previous.concat(n)
}, [])
http://lorempixel.com/640/480/abstract/
@juliandescottes
juliandescottes / getpath.js
Last active April 26, 2024 23:04
getPath
module.exports = function (object, path) {
var parts = path.split ? path.split(".") : path;
try {
var node = object;
parts.forEach(function (part) {
node = node[part];
});
return node;
} catch (e) {
@juliandescottes
juliandescottes / the-one-bookmarklet.js
Created December 2, 2014 22:19
Spawn a tiny UI to create a bookmarklet. (see comment for the bookmark-ready javascript code)
(function () {
/**
* Adapted from http://ted.mielczarek.org/code/mozilla/bookmarklet.html
*/
//*****************************************************************************
// Do not remove this notice.
//
// Copyright 2001 by Mike Hall.