Skip to content

Instantly share code, notes, and snippets.

View ihabunek's full-sized avatar

Ivan Habunek ihabunek

View GitHub Profile
"""
Attempt to display an image in Textual using the kitty graphics protocol.
This currently does not work, even though render_kitty() itself works and
printing the resulting Text will display it in console.
"""
import asyncio
from asyncio.subprocess import PIPE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
meta {
title: "Highlighted capes and bays";
description: "Highlights capes and bays for better visibility.";
version: "1.0.0_2020-03-24";
author: "Ivan Habunek";
}
node|z14-[natural=cape],
node|z14-[natural=bay] {
text: auto;
CREATE OR REPLACE FUNCTION anonymize_people()
RETURNS void AS
$$
DECLARE
first_names text[] := '{"April","Abigail","Adriana","Adrienne","Aimee","Alejandra","Alexa","Alexandra","Alexandria","Alexis","Alice","Alicia","Alisha","Alison","Allison","Alyssa","Amanda","Amber","Amy","Ana","Andrea","Angel","Angela","Angelica","Angie","Anita","Ann","Anna","Anne","Annette","Ariana","Ariel","Ashlee","Ashley","Audrey","Autumn","Bailey","Barbara","Becky","Belinda","Beth","Bethany","Betty","Beverly","Bianca","Bonnie","Brandi","Brandy","Breanna","Brenda","Briana","Brianna","Bridget","Brittany","Brittney","Brooke","Caitlin","Caitlyn","Candace","Candice","Carla","Carly","Carmen","Carol","Caroline","Carolyn","Carrie","Casey","Cassandra","Cassidy","Cassie","Catherine","Cathy","Charlene","Charlotte","Chelsea","Chelsey","Cheryl","Cheyenne","Chloe","Christie","Christina","Christine","Christy","Cindy","Claire","Claudia","Colleen","Connie","Courtney","Cristina","Crystal","Cynthia","Daisy","Dana","Danielle","Darlene","Dawn","Deanna

Line selection

The URL hash (fragment) describes the selected lines. Examples:

hash description
#L10 single line
#L10,15,20 multiple lines
#L10-15 span of lines
From 53fec5930a999b22fcb633495ae61d24fa997614 Mon Sep 17 00:00:00 2001
From: Ivan Habunek <ivan@habunek.com>
Date: Tue, 15 Jan 2019 11:07:30 +0100
Subject: [PATCH git.sr.ht] This is the title, upto 50 chars
To: ~sircmpwn/sr.ht-dev@lists.sr.ht
The rest of the commit message goes here.
---

Advent of code 2019, day19

Annotated assembler code, program translated to python.

Registers

Aliases used in pseudocode & python shown in parenthesis.

r0 (r) - result accumulator
Advent of code 2018, day17
...........................................................................................................................................................................................................................................................................................................................................................................................
...........................................................................................................................................................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................................
@ihabunek
ihabunek / refs.rss.xml
Last active November 16, 2018 19:19
rss for sr.ht
<rss version="2.0">
<channel>
<title>~ihabunek/foo refs - sr.ht</title>
<link>http://localhost:5001/~ihabunek/foo/refs</link>
<description>Git refs for ~ihabunek/foo</description>
<language>en-us</language>
<item>
<title>0.17.0</title>
<link>http://localhost:5001/%7Eihabunek/foo/refs/0.17.0</link>
<author>Ivan Habunek &lt;ivan@habunek.com&gt;</author>