Skip to content

Instantly share code, notes, and snippets.

View patrolez's full-sized avatar

Patryk patrolez

  • Wrocław, Poland
View GitHub Profile
@patrolez
patrolez / List_of_tz_database_time_zones
Last active June 6, 2019 12:06
Parseable: List of tz database time zones
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# List_of_tz_database_time_zones
#
country_code, tz_database_name
ET, Africa/Addis_Ababa
ER, Africa/Asmara
ML, Africa/Bamako
CF, Africa/Bangui
GM, Africa/Banjul
MW, Africa/Blantyre
@patrolez
patrolez / wykop_3bajtowe_emoji.user.js
Last active February 26, 2023 12:47
Wykop.pl 3 bajtowe emoji picker
// ==UserScript==
// @name Wykop Emojis 3-bajtowe
// @namespace https://gist.github.com/patrolez/
// @version 0.4.12
// @downloadURL https://gist.github.com/patrolez/b10d4500451eefdd47504fba987cd8b5/raw/wykop_3bajtowe_emoji.user.js
// @updateURL https://gist.github.com/patrolez/b10d4500451eefdd47504fba987cd8b5/raw/wykop_3bajtowe_emoji.user.js
// @description Emojis subset limited to 3-bytes Unicode. It works in misconfigured MySQL databases with wrong `utf8` charset. <https://stackoverflow.com/a/50264108/12755962>
// @match https://www.wykop.pl/*
// @match https://wykop.pl/*
// @icon https://www.google.com/s2/favicons?domain=wykop.pl
#!/bin/bash
# contact: patrolez
#
# requires 'imagemagic'
# In Ubuntu/Debian:
# sudo apt-get install imagemagick-6.q16
#
TIMEOUT=20s

Handy static Nginx in docker HTTP one-liner Web Server files hosting with Directory Listing of $PWD

It has autoindex on specified by default.

Can be accessed via HTTP with port 8000, should be bound to the 0.0.0.0 IP address.

docker run --rm -it -p 8000:80 -v $PWD:/mnt/data nginx /bin/bash -c "echo $'server {\nlisten 80;\nserver_tokens off;\n\nlocation / {\nalias /mnt/data/;\nexpires -1;\nautoindex on;\ndefault_type text/plain;\n}\n}' > /etc/nginx/conf.d/default.conf; nginx -g 'daemon off;'"
// ==UserScript==
// @name Śnieg
// @namespace http://tampermonkey.net/
// @version 2024-12-19
// @description try to take over the world!
// @author You
// @match https://pancernik.info/
// @noframes
// @icon https://www.google.com/s2/favicons?sz=64&domain=pancernik.info
// @require https://unpkg.com/magic-snowflakes/dist/snowflakes.min.js