Skip to content

Instantly share code, notes, and snippets.

View imme-emosol's full-sized avatar
😱
sto der skjælvende av angst – og følte et stort uendelig skrik gjennom naturen

immeëmosol imme-emosol

😱
sto der skjælvende av angst – og følte et stort uendelig skrik gjennom naturen
View GitHub Profile
@imme-emosol
imme-emosol / regex_url.php
Created December 5, 2010 09:37
uri checkers testbed in php
<?php
/*
* Note: You'll need PHP5.3 to run this script!
*/
/*
* Patterns originate from http://mathiasbynens.be/demo/url-regex
*
* Note: None of the patterns had the S-modifier. I added it to speed up the tests.
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
//
// the regular expression composed & commented
// could be easily tweaked for RFC compliance,
// it was expressly modified to fit & satisfy
// these test for an URL shortener:
@imme-emosol
imme-emosol / TrueColour.md
Created January 14, 2019 14:44 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@imme-emosol
imme-emosol / qvm-portfwd-iptables
Last active November 27, 2023 09:25 — forked from neowutran/qvm-portfwd-iptables
Qubes-os port forwarding to allow external connections
#!/usr/bin/env sh
# Adapted from previous work:
# - https://gist.github.com/neowutran/e93ce542ba1e94a5ecbf1a38eef85485
# Adapted previous work to support QubesOS v4.2
# - https://gist.github.com/fepitre/941d7161ae1150d90e15f778027e3248
# - https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5
# - https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369
# - https://gist.github.com/Joeviocoe/6c4dc0c283f6d6c5b1a3f5af8793292b