Skip to content

Instantly share code, notes, and snippets.

View ngerritsen's full-sized avatar
🚀

Niels Gerritsen ngerritsen

🚀
View GitHub Profile
@ngerritsen
ngerritsen / paste.js
Last active September 4, 2020 07:30
Get Flat UI Colors as SCSS variables
// Paste the following code in the console on the desired colors page:
[...document.querySelectorAll('.color')].map(color => {
const name = color.textContent
.trim()
.toLowerCase()
.replace(/\s+/g, '-')
.replace(/[^a-zA-Z0-9-]+/g, '');
const value = color.style.backgroundColor;
return `$color-${name}: ${value};`;
@ngerritsen
ngerritsen / README.md
Last active April 23, 2023 19:00
Krunker.io config

Niels' Krunker.io config

  1. Copy config.txt contents.
  2. In Krunker go to settings > Import.
  3. Paste the config.
  4. Go to mods and install philzgoodmod.
  5. Adjust the sensitivity to match your preference.
  6. Adjust the resolution to match your computers performance.

Preferable run Krunker using the Windows, macOS or Linux client to get maximum FPS. Try to get as much FPS as possible by adjusting the resolution without looking blurry/pixelated.

@ngerritsen
ngerritsen / checkElementCount.js
Created March 28, 2019 13:21
Element counter
// Paste into browser console and hover elements.
(function checkElementCount() {
let current = null;
let counter = null;
function init() {
document.body.addEventListener('mouseover', onMouseOver);
updateCounter(getChildElementCount(document));
}
@ngerritsen
ngerritsen / templateStringVsJsonStringify.js
Last active October 24, 2017 19:43
Template string vs JSON.stringify test
'use strict';
const NS_PER_SEC = 1e9;
const MS_PER_NS = 1e6;
const ITEMS = 100000;
const data = getData();
run();
runWithTemplate();
@ngerritsen
ngerritsen / hrTimer.js
Last active October 4, 2018 09:07
Node hr timer
const NS_PER_SEC = 1000000000;
const NS_PER_MS = 1000000;
function getTimer() {
const time = process.hrtime();
return {
elapsed() {
const [seconds, nanoseconds] = process.hrtime(time);
return (seconds * NS_PER_SEC + nanoseconds) / NS_PER_MS;
@ngerritsen
ngerritsen / napaJsonStringifyParalellisationTest.js
Last active October 24, 2017 19:43
Napa JSON.stringify parallelisation test
'use strict';
const napa = require('napajs');
const NS_PER_SEC = 1e9;
const MS_PER_NS = 1e6;
const NAPA_WORKERS = 6;
const ITEMS = 100000;
const data = getData();
@ngerritsen
ngerritsen / getChromeUserGlobalVars.js
Last active October 24, 2017 19:43
Get all global variables in Chrome
(function () {
// Update this list with all libraries/global variables you DONT want to see. For instance if you DO want to see jQuery, remove it from this list.
const keysToFilter = ["$","jQuery","Modernizr","SS","ZeroClipboard","Hammer","CobrowserChatApi","_cobrowserapi","GoogleAnalyticsObject","ga","gaplugins","gaGlobal","scan","external","chrome","document","speechSynthesis","caches","ondeviceorientationabsolute","ondevicelight","localStorage","sessionStorage","webkitStorageInfo","indexedDB","webkitIndexedDB","ondeviceorientation","ondevicemotion","crypto","postMessage","blur","focus","close","onautocompleteerror","onautocomplete","onunhandledrejection","onrejectionhandled","applicationCache","performance","onunload","onstorage","onpopstate","onpageshow","onpagehide","ononline","onoffline","onmessage","onlanguagechange","onhashchange","onbeforeunload","onwaiting","onvolumechange","ontoggle","ontimeupdate","onsuspend","onsubmit","onstalled","onshow","onselect","onseeking","onseeked","onscroll","onresiz
@ngerritsen
ngerritsen / README.md
Last active October 10, 2022 18:11 — forked from nickbudi/README.md
Counter-Strike: Global Offensive config

Niels' CS:GO config

This was once forked from Budi's CS:GO config.

Launch Options

-novid +exec autoexec.cfg

Enter launch options at