Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Habunek ihabunek

View GitHub Profile
View autotrolej.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View autotrolej.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Styles_HighlightedCapesBays-style.mapcss
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;
View anon.sql
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
View line_selection.md

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
View gist:b14f14d2b948df9d99380f8a5d207506
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.
---
View aoc2018.day19.md

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
View aoc2018.day17
Advent of code 2018, day17
...........................................................................................................................................................................................................................................................................................................................................................................................
...........................................................................................................................................................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................................
@ihabunek
ihabunek / refs.rss.xml
Last active Nov 16, 2018
rss for sr.ht
View refs.rss.xml
<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>
View maim.sh
#!/usr/bin/env bash
# Find an unused file name to capture to
DIR=~/Pictures/Screenshots/
N=1
while [ -f "$DIR`printf %05d $N`.png" ]; do
N=$((N+1))
done
FILENAME=$DIR`printf %05d $N`.png