Skip to content

Instantly share code, notes, and snippets.

View StanAngeloff's full-sized avatar

Stan Angeloff StanAngeloff

View GitHub Profile
@Dan-Q
Dan-Q / _no_code_page_.php
Last active December 28, 2023 18:01
Hacky PHP to produce a "blank" web page which somehow has content when viewed in Firefox. Sample page at https://danq.me/wp-content/no-code-webpage/, explanation at https://danq.me/nocode
<?php
// half-hearted CSS minification
$css = preg_replace(
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'),
array('$1{ ','$1$3;',"",'} '),
file_get_contents('linked.css')
);
// embed as a data: uri
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '=');
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 14, 2024 20:05
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@fnky
fnky / ANSI.md
Last active April 16, 2024 07:46
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@saitoha
saitoha / rxvt-unicode-sixel.patch
Last active May 2, 2019 10:17
Add SIXEL graphics support for rxvt-unicode.
diff --git a/src/Makefile.in b/src/Makefile.in
index 18acb39e..ef2e7a40 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -40,7 +40,7 @@ COMMON = \
screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o \
rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o \
- ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o @PERL_O@
+ ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o sixel.o @PERL_O@
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 15, 2024 01:27
Hyperlinks in Terminal Emulators

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@dysinger
dysinger / ubuntu-13.10-docker-0.6.5.sh
Created October 31, 2013 22:40
ok the steps for ubuntu 13.10 w/ docker are a tiny bit debian-tricky but easy enough. You have to add saucy-proposed to your repos & pin * at 400 from that repo. then you install lxc from that repo. So the install goes like this:
cat >/etc/apt/preferences.d/saucy-proposed <\EOF
Package: *
Pin: release a=saucy-proposed
Pin-Priority: 400
EOF
cat >/etc/apt/sources.d/saucy-proposed.list <\EOF
deb http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-proposed main restricted universe
@Stanback
Stanback / nginx.conf
Last active April 5, 2024 11:40 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@diyan
diyan / i3.conf
Last active November 26, 2022 22:53
i3 tiling window manager configuration
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!