Skip to content

Instantly share code, notes, and snippets.

View ihabunek's full-sized avatar

Ivan Habunek ihabunek

View GitHub Profile

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>
@ihabunek
ihabunek / slowref.md
Last active November 12, 2018 22:54
PHP: Passing a large referenced array into a function is slow

PHP: Passing a large referenced array into a function is slow

This is interesting.

<?php 

define ('ITEMS', 1000);
define ('REPEAT', 10000);
@ihabunek
ihabunek / maim.sh
Last active November 9, 2018 14:00
#!/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
@ihabunek
ihabunek / README.md
Last active October 8, 2018 16:27
Human readable menus for Tjedan Restorana 2018

Human readable menus for Tjedan Restorana 2018

As always, here are the menus in a single, readable and searchable markdown formatted file.

Script which generated this is at the bottom. Some manual adjustments were done to improve output quality.

Enjoy, Ivan

@ihabunek
ihabunek / gist:3714740
Created September 13, 2012 14:42
Cross-compiling subsurface for Windows on Fedora 17
#
# Cross-compiling subsurface for windows, starting with a clean install
# of Fedora 17.
#
# Before starting create a user and add him to /etc/sudoers.
#
# Basic tools
sudo yum install vim git tar
@ihabunek
ihabunek / tjedan-restorana-19.md
Last active March 9, 2018 10:24
Human readable menus for Tjedan restorana

19. Tjedan restorana

2018-03-09 - 2018-03-18
http://tjedanrestorana.com/

Web site scraped and parsed to generate a single markdown file containing all the menus.

Script used to generate the markdown is attached below the menus. Table of contents and minor adjustments done by hand.

Share and enjoy.

(ns aoc2017.foo)
(def node-map
"A tree structure defined as a map"
{:a [:b :c]
:b [:d :e :f]
:e [:g :h :i]
:i [:j :k]})
(defn count-nodes

Tjedan Restorana 2017

Human-readable menus.

RESTORAN: Academia, Bluesun Hotel Kaj

PREDJELO

  1. Juha od graha s hrskavim kruhom
  2. Ragu od junetine s naših pašnjaka – homemade pasta s brašnom od bučinih sjemenki