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
let loopRunning = true; | |
// Function to simulate resource-intensive task | |
function doTask() { | |
// Simulate a task that consumes memory | |
const array = new Array(10000).fill( | |
new Array(10000).fill( | |
new Array(10000).fill( | |
new Array(10000).fill( | |
new Array(10000).fill( |
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 Instant setInterval Execution | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*/* | |
// @grant none | |
// @run-at document-start | |
// ==/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
let arr = [ | |
{ | |
name: 'P. PHÚC XÁ, Q. BA ĐÌNH, TP. HÀ NỘI', | |
provinceName: 'TP. HÀ NỘI', | |
provinceCode: '01', | |
stateName: 'Q. BA ĐÌNH', | |
stateCode: '001', | |
wardName: 'P. PHÚC XÁ', | |
wardCode: '00001', | |
}, |
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
// Minify | |
javascript:(()=>{const o=[`https://mneylink.com/load_traffic?r=${location.href}&w=${location.href}`,`https://traffic1s.com/get-codes?client_id=${t=(new Date).getTime(),window.performance&&"function"==typeof window.performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(o){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==o?n:3&n|8).toString(16)}))}&pathname=/&href=${location.href}/&hostname=${location.hostname}`];var t;const n=[];function e(o,t){for(const n of t)if(o[n])return o[n];for(const n in o)if("object"==typeof o[n]){const x=e(o[n],t);if(x)return x}}Promise.all(o.map((o=>fetch(o).then((o=>o.json()))))).then((o=>{o.forEach((o=>{const t=e(o,["html","code"]);t&&n.push(t)})),alert(n)}))})(); | |
// Full | |
(() =>{ | |
const url = [`https://mneylink.com/load_traffic?r=${location.href}&w=${location.href}`, `https://traffic1s.com/get-codes?pathname=/&href=${location.href}/&hostname=${location.hostname}`]; | |
const result = []; | |
function findDeepKey |
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
export const createEnum = (keys, values, isUnique) => { | |
if (!keys) return {}; | |
if (values === undefined || !Array.isArray(values)) { | |
if (Array.isArray(keys)) { | |
const enumObj = {}; | |
for (const key of keys) { | |
enumObj[key] = isUnique ? Symbol(key) : key; | |
} | |
return Object.freeze(enumObj); |
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
[ | |
{ | |
"site_id": 1, | |
"hour": 8, | |
"dayofweek": 1, | |
"day": 21, | |
"month": 8, | |
"total": 363 | |
}, | |
{ |
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
"better-comments.tags": [ | |
{ | |
"tag": "- [x]", | |
"color": "#6a6758", | |
"strikethrough": false, | |
"underline": false, | |
"backgroundColor": "transparent", | |
"bold": false, | |
"italic": 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
import moment from 'moment'; | |
/** | |
* @param {string} dateA - a date, represented in string format | |
* @param {string} dateB - a date, represented in string format | |
*/ | |
const date = (dateA, dateB) => moment(dateA).diff(moment(dateB)); | |
/** |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Run docker-compose", | |
"type": "shell", | |
"command": "docker compose up -d", | |
"windows": { | |
"command": "docker-compose up -d" | |
}, |
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
(() => { | |
let gridSystem = document.querySelector("#grid-system"); | |
if (gridSystem) { | |
gridSystem.remove(); | |
document.querySelector('#grid-controller').remove(); | |
return; | |
} | |
const grid = document.createElement("article"); | |
grid.id = "grid-system"; | |
let style = document.createElement("style"); |
NewerOlder