Skip to content

Instantly share code, notes, and snippets.

@vladan
vladan / day7.py
Created December 7, 2020 21:46
aoc 2020 day 7 python solution
import re
def parse(filename):
bags = {}
inverted_bags = {}
with open(filename) as in_f:
for line in in_f.readlines():
color, _, rest = map(lambda s: s.strip(), line.partition("bags contain "))
# Maintainer: Alastair Pharo <asppsa at gmail dot com>
# Contributor: Felix Morgner <felix.morgner@gmail.com>
# Contributor: Vlad M. <vlad@archlinux.net>
# Contributor: Mario Rodas
# Contributor: Oozyslug <oozyslug at gmail dot com>
# Contributor: koral <koral at mailoo dot org>
# Contributor: Anders Bennehag
pkgname=nix
pkgver=2.3.1
@vladan
vladan / requirements.txt
Created February 26, 2017 22:50
requirements & setup.py
-e .
@vladan
vladan / vmclone.sh
Created November 15, 2015 21:17
virt helper scripts
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Usage: vmclone orig-name [cloned-vm-name]"
echo "If cloned-vm-name isn't provided '-clone' is appended to the original name."
exit -1
fi
orig=$1
├── 47
│   ├── 0
│   │   └── 500
│   │   ├── playlist0.ts
│   │   ├── playlist1.ts
│   │   ├── playlist2.ts
│   │   └── playlist.m3u8
│   ├── 1
│   │   └── 500
│   │   ├── playlist0.ts
# 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!
@vladan
vladan / apache-qpid-cpp-0.22_PKGBUILD
Created August 27, 2013 14:33
apache-qpid-* (version 0.22) PKGBUILD scripts for AUR
# Maintainer: Ciriaco Garcia de Celis <cgarcia at etherpilot.com>
pkgname=apache-qpid-cpp
pkgver=0.22
pkgrel=1
pkgdesc="apache qpid C++ broker and client"
arch=('i686' 'x86_64')
url="http://qpid.apache.org/index.html"
license=('APACHE')
makedepends=('util-linux' 'boost' 'python2')
depends=('boost>=1.50')
@vladan
vladan / CNAME
Created March 6, 2012 18:30
JS пликација за пресметување на плати. Во контролерот се вршат пресметките, другото е само приказ. angular.min.js е ставен за да работи сѐ од 1ва.
kalkulator.ot.mk