Skip to content

Instantly share code, notes, and snippets.

View stefanjudis's full-sized avatar
🙉
Jo!

Stefan Judis stefanjudis

🙉
Jo!
View GitHub Profile
@jonathan-reisdorf
jonathan-reisdorf / buergeramt.user.js
Last active June 24, 2023 15:10
add "taken" page
// ==UserScript==
// @name Bürgeramt Termin Hunting
// @description Helfer fürs Bürgeramt
// @include htt*://service.berlin.de/terminvereinbarung*
// @version 2.02
// ==/UserScript==
const MIN_RELOAD_DELAY = 60000;
const ADDITIONAL_RELOAD_DELAY = Math.round(Math.random() * 30000);
const HUNTING_CONFIG = {
acceptableDayRange: 99,
@marcolink
marcolink / chunkify.js
Last active January 17, 2023 23:46
Create contentful export chunks
/*
For very big spaces, we can create chunks of the export, and import them separately.
To make it work, we have to keep a specific order.
*/
const fs = require('fs');
const path = require('path');
/* the order of types must be kept */
const types = [
@developit
developit / *constant-locals-loader.md
Last active February 4, 2022 17:15
Inline Webpack CSS Modules classNames, reducing bundle size. https://npm.im/constant-locals-loader

constant-locals-loader for Webpack

This loader optimizes the output of mini-css-extract-plugin and/or css-loader, entirely removing the potentially large CSS classname mappings normally inlined into your bundle when using CSS Modules.

Run npm install constant-locals-loader, then make these changes in your Webpack config:

module.exports = {
 module: {
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@paulirish
paulirish / bling.js
Last active November 22, 2024 20:26
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@stryju
stryju / require-define.sublime-snippet
Last active August 29, 2015 14:13
require angular sublime snippets
<snippet>
<content><![CDATA[
/* global define */
define( function ( require, exports, module ) {
'use strict';
$1
});
]]></content>
@ericelliott
ericelliott / essential-javascript-links.md
Last active December 24, 2024 06:56
Essential JavaScript Links
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active October 12, 2024 16:34
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");