Skip to content

Instantly share code, notes, and snippets.

View matthiassturm's full-sized avatar

Matthias Sturm matthiassturm

View GitHub Profile
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
@hongar
hongar / gist:2a7c416c6d049fb5891a5577a424e56d
Created May 7, 2021 00:38
uBlock Origin: Block "Sign in to (website) with Google" popup
||id.google.com^
||accounts.google.com/gsi/$3p
@xuio
xuio / buergerbot.rb
Last active May 24, 2023 20:59 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you via Telegram
#!/usr/bin/env ruby
require 'watir-webdriver'
require 'telegram/bot'
Telegram.bots_config = {
default: '<Telegram Bot token>',
}
Telegram.bot.get_updates
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@jersey99
jersey99 / life_in_seconds.py
Last active February 15, 2019 02:19
Get your age in seconds. And find out when you hit that integer exponent in your favorite base
#!/usr/bin/env python3
import argparse
import math
from datetime import datetime, timezone, timedelta
def get_tob_from_str(tob_str):
# Time of birth
try:
tob = datetime.strptime(tob_str, "%Y-%m-%dT%H:%M:%S%z")
@trent2
trent2 / unob_spiegelplus.user.js
Last active February 22, 2022 06:47
Unobfuscate SPIEGEL plus articles with greasemonkey
// ==UserScript==
// @name unobfuscate spiegel plus
// @namespace obfuscate
// @include http://www.spiegel.de/*
// @version 1
// @grant none
// ==/UserScript==
if(document.getElementsByClassName('obfuscated-content')[0] != undefined) {
document.getElementsByClassName('obfuscated-content')[0].setAttribute("class", "");
var elems = document.getElementsByClassName('obfuscated'), t, or, c, i, cc;
@joepie91
joepie91 / vpn.md
Last active June 25, 2024 22:03
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active June 24, 2024 03:07
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@paulirish
paulirish / what-forces-layout.md
Last active June 26, 2024 15:20
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;