Skip to content

Instantly share code, notes, and snippets.

View poetaman's full-sized avatar
🍊
vitamin C(ode)

poetaman

🍊
vitamin C(ode)
View GitHub Profile
@vmedea
vmedea / parse_xbin.py
Last active December 15, 2022 09:19
Command line tarot
#!/usr/bin/env python3
# (C) Mara Huldra 2022
# SPDX-License-Identifier: MIT
'''
Parser for XBin file (ANSI/ASCII/PETSCII art grid).
Convert to unicode and print it out.
'''
import itertools
import struct
import sys
@ReturnRei
ReturnRei / Arch on Mac M1.txt
Last active July 29, 2023 20:58
Install Arch / EndeavourOS Mac M1 Parallels
This gist is provided as an addition to my youtube video
https://www.youtube.com/watch?v=dKvetujHjYQ&t=737s
## Useful links
https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux#Using_a_chroot_environment
https://archlinuxarm.org/platforms/armv8/generic
https://www.reddit.com/r/archlinux/comments/6kwt61/systemd_doesnt_create_machineid_during/
https://arm.endeavouros.com/endeavouros-arm-install/
## Get into chroot
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active September 19, 2024 03:25
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
@yegappan
yegappan / gist:3b50ec9ea86ad4511d3a213ee39f1ee0
Last active April 11, 2023 00:03
Updating a quickfix/location list asynchronously without interfering with another plugin
Vim has many plugins (vim-go, ale, etc.) that use the quickfix/location list
feature. Some of these plugins process the output of an external command and
update the quickfix list asynchronously as the output becomes available.
Updating a quickfix or location list asynchronously opens up the possibility
that two or more plugins may try to update the same quickfix list with
different output. Also when a plugin is updating a quickfix list in the
background, the user may issue a command that creates or updates a quickfix
list. The plugin may then incorrectly use this new list to add the entries.
@romainl
romainl / colorscheme-override.md
Last active August 27, 2024 20:42
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
@sindresorhus
sindresorhus / TrueColour.md
Created January 17, 2017 11:46 — 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"
@nuada
nuada / launch_terminal.sh
Created May 18, 2016 11:04
Execute command in new Terminal window on Mac OS X using Applescript.
#!/bin/sh
echo 'on run
-- check if Terminal is already running
tell application "System Events"
set isRunning to (exists process "Terminal")
end tell
tell application "Terminal"
-- if Terminal is running create new window
if isRunning then do script ""
@msimpson
msimpson / cfire
Created July 21, 2011 10:51
Curses based ASCII art fire animation.
#!/usr/bin/python
import curses, random
screen = curses.initscr()
width = screen.getmaxyx()[1]
height = screen.getmaxyx()[0]
size = width*height
char = [" ", ".", ":", "^", "*", "x", "s", "S", "#", "$"]
b = []
@pgundlach
pgundlach / viznodelist.lua
Last active January 10, 2022 01:43
LuaTeX nodelist visualization
--
-- viznodelist.lua
-- speedata publisher
--
-- Written 2010-2020 by Patrick Gundlach.
-- This file is released in the spirit of the well known MIT license
-- (see https://opensource.org/licenses/MIT for more information)
--
-- visualizes nodelists using graphviz