Skip to content

Instantly share code, notes, and snippets.

View ThomasRettig's full-sized avatar
👋
Hello

Thomas Rettig ThomasRettig

👋
Hello
View GitHub Profile
@ThomasRettig
ThomasRettig / JavaScript Blacklist
Created December 20, 2021 04:09 — forked from gruber/JavaScript Blacklist
My list of blocked sites for use with Drew Thaler's JavaScript Blacklist extension for Safari (https://code.google.com/p/jsblacklist/downloads/list)
adclick.g.doubleclick.net, addthis.com, adgardener.com, adnxs.com, ads.pointroll.com, ads.shorttail.net, apture.com, bop.fm, cdn.taboolasyndication.com, chartbeat.com, chartbeat.net, d1.openx.org, doubleclick.net, doubleverify.com, exitjunction.com, fyre.co, getconnected.southwestwi-fi.com, googleadservices.com, gravity.com, grvcdn.com, imrworldwide.com, intellitxt.com, jetpackdigital.com, kontera.com, livefyre.com, luminate.com, meebo.com, moovmanage.com, outbrain.com, parsely.com, po.st, pointroll.com, pubmatic.com, quantserve.com, s.ppjol.net, scorecardresearch.com, serving-sys.com, sharethis.com, snap.com, superclick.com, taboola.com, taboolasyndication.com, tynt.com, wibiya.com, zergnet.com
@ThomasRettig
ThomasRettig / plakato_draw_3d.py
Created December 29, 2021 10:04 — forked from stenson/plakato_draw_3d.py
plakato draw variating in 3d
from coldtype import *
from coldtype.blender import *
keyframes = dict()
for x in range(0, 4):
keyframes[f"{x}0"] = dict(ANIM=0)
keyframes[f"{x}1"] = dict(ANIM=1)
at = AsciiTimeline(2, 24, """
<
@ThomasRettig
ThomasRettig / darkmode.css
Last active January 22, 2022 07:06
Out-of-the-box "dark mode" appearance
/* --------------------------------------------------------------
Dark mode CSS by Thomas Rettig
License: Public Domain
-----------------------------------------------------------*/
@media screen and (prefers-color-scheme: dark) {
html {
/* ensure input elements such as <textarea> and <input type="checkbox"> are rendered in native dark mode for consistency */
color-scheme: dark auto;
}
@ThomasRettig
ThomasRettig / print.css
Last active January 21, 2022 08:01
CSS stylesheet to enchance print layout
/* --------------------------------------------------------------
Modified version of Hartija CSS Print Framework
License: MIT
Version: 1.0
-------------------------------------------------------------- */
body {
color: #000;
background: #0000;
font-size: 15pt;
@ThomasRettig
ThomasRettig / consonantExtractor.py
Last active January 15, 2022 09:23
Extract consonants from a given string
def consonantExtractor(word):
consonants = "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ"
res = []
for chr in str(word):
if chr in consonants:
res.extend(chr)
consonants = "".join(res)
return(consonants)
print(consonantExtractor("Hello world!"))
var body = document.getElementById("body")
var colors = ['#97F091', '#91f0e3', '#ffea54', '#e0f1ff', '#c8ffed', '#b0e8f5']; // the colors we'd like to use
body.style.backgroundColor = colours[Math.floor(Math.random() * colours.length)]; // randomly choose a color from the array
@ThomasRettig
ThomasRettig / generate-html.pl
Last active March 31, 2023 11:33
A boilerplate HTML file generator written in Perl
#!/usr/bin/perl
use strict;
use warnings;
use Term::ANSIColor;
my ($title, $num, $normalize) = @ARGV;
# Validate input
if (!$title || !$num || $normalize !~ /^(y|n)$/i) {
print color('bright_red'), "Usage: ", color('reset'), "$0 <filename> <number-of-files> <normalize[y/n]>\n";
@ThomasRettig
ThomasRettig / uca.pl
Created January 18, 2022 14:28 — forked from rsms/uca.pl
Unicode Collation Algorithm (sort)
use Unicode::Collate;
# https://metacpan.org/pod/Unicode::Collate
my @unsorted = ('A', "\xF0\x9F\x97\x91", 'B');
print "unsorted:\n";
foreach (@unsorted) {
print "$_\n";
}
my @sorted = Unicode::Collate->new()->sort(@unsorted);
@ThomasRettig
ThomasRettig / xss.svg
Last active January 30, 2022 13:40
Demonstration of how SVG can be expolited to execute cross-site scripting attacks.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThomasRettig
ThomasRettig / typeSample.js
Last active January 22, 2022 12:45
Type Sample code
javascript: void((function (d) % 7 Bvar e = d.createElement('script'); e.setAttribute('type', 'text/javascript'); e.setAttribute('charset', 'UTF-8'); e.setAttribute('src', '//www.typesample.com/assets/typesample.js?r=%27+Math.random()*99999999);d.body.appendChild(e)%7D)(document));