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
GOD SWORD | |
/give @p netherite_sword{Unbreakable:1,Enchantments:[{id:sweeping,lvl:1000},{id:knockback,lvl:1000},{id:fire_aspect,lvl:1000},{id:mending,lvl:1000},{id:sharpness,lvl:1000},{id:looting,lvl:3}]} | |
GOD HELMET | |
/give @p minecraft:netherite_helmet{Unbreakable:1,Enchantments:[{id:thorns,lvl:1000},{id:respiration,lvl:1000},{id:protection,lvl:1000},{id:fire_protection,lvl:1000},{id:blast_protection,lvl:1000},{id:aqua_affinity,lvl:1000}]} | |
GOD CHESTPLATE |
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
/* this assumes you have a div, somewhere near | |
your containing div that is setup like this: | |
const hiddenMaskStyles = { | |
display: 'none', | |
}; | |
const errorMaskStyles = { | |
minHeight: '560px', | |
height: '560px', |
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
{ | |
"editor.tabSize": 2, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontSize": 16, | |
"editor.fontLigatures": true, | |
"editor.minimap.enabled": false, | |
"editor.cursorStyle": "line", | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ |
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 latentImages = (function(w,d) { | |
var state = {}; | |
state.dom = []; | |
function eventWrapper(type, name, obj) { | |
obj = obj || window; | |
var running = false; | |
function func() { | |
if (running) { return; } |
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
const log = require('debug')('bot:app:shared:cacheable:'); | |
const ms = require('ms'); | |
/** | |
* Volatile state/cache machine | |
* @param { object } settings - Settings for cache, includes | |
*/ | |
function cacheable(settings = {}) { | |
const { key = 'cacheable', ttl = '3h', staleMaths = 0.65 } = settings; |
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
const store = { | |
cache: {}, | |
expires: 0, | |
ttl: '1h' | |
}; | |
function cacheable(settings) { | |
return function cache() { | |
const now = Date.now(); | |
let isExpired = false; |
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
const emojiContainer = document.getElementById('custom_emoji'); | |
const emojis = emojiContainer.querySelectorAll('tr.emoji_row'); | |
const scrapped = Array.prototype.slice.call(emojis).map((row) => { | |
const url = row.querySelector('span.emoji-wrapper').getAttribute('data-original'); | |
const name = row.querySelector('[headers="custom_emoji_name"]').innerText; | |
return { name, url }; | |
}); | |
console.log('total emojis: ', scrapped.length); | |
console.log('data model: ', scrapped[Math.floor(Math.random() * scrapped.length)]); |
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
const EventEmitter = require('events'); | |
class Eventry extends EventEmitter { | |
constructor(type = 'none', ...args) { | |
super(args); | |
this.type = type; | |
} | |
// overload .on and .emit func to | |
// support special event syntax | |
on(ev, fn) { |
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
// transformy is an object mapping tool to | |
// transform objects to another object defaults | |
function extenze() { | |
const args = Array.prototype.slice.call(arguments); | |
const source = args.shift(); | |
let current; | |
while (current = args.shift()) { | |
Object.keys(current).forEach((key) => { | |
source[key] = typeof current[key] === 'object' |
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
const gulp = require('gulp'); | |
const uglify = require('gulp-uglify'); | |
const concat = require('gulp-concat'); | |
// path prefix | |
const prefix = 'assets/'; | |
const vendorPrefix = `${prefix}src/vendor/`; | |
const bowerPrefix = `${prefix}src/bower/`; | |
const files = { |
NewerOlder