Advent of Code Day #6

Day 6 is again pretty nice to solve with Ruby. Today it is all about customs declaration. We again have different groups seperated by a newline containing multiple lines with characters. Each line represents a person and each character represents a different question answered with “yes”. abc a b c ab ac a a a a In this example we do have four groups of people. The first group only has one person which answered three questions. The second group as three people which answered three (different) questions. The third group has two people, they both answered question a and then two different questions. In the fourth group every of the four people answered one (the same) question. ...

December 6, 2020 · 2 min · 328 words · Robert

Advent of Code Day #5

Day five is all about the airplane seating. One seat it represented by something like this: FBFBBFFRLR. The first eight characters are for the row, the last three for the seat. Part 1 We need to find the highest seat id to solve the first part. The seat id is calculated with: row-id * 8 + column. For the rows you start with a range of 0 to 127. F means use the first half B means use the last half With this in mind you need to iterate over the first eight characters to get your seat. ...

December 5, 2020 · 2 min · 263 words · Robert

Advent of Code Day #4

In day 4 we need to deal with passports (yay!) and check if they are valid for given criterias. The passworts do have multiple fields (key:value) and are divided by a newline. ecl:gry pid:860033327 eyr:2020 hcl:#fffffd byr:1937 iyr:2017 cid:147 hgt:183cm iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 hcl:#cfa07d byr:1929 hcl:#ae17e1 iyr:2013 eyr:2024 ecl:brn pid:760753108 byr:1931 hgt:179cm The fields are given and expected like so: byr (Birth Year) iyr (Issue Year) eyr (Expiration Year) hgt (Height) hcl (Hair Color) ecl (Eye Color) pid (Passport ID) cid (Country ID) Splitting them into “passports” is as easy as it gets. ...

December 4, 2020 · 2 min · 255 words · Robert

Advent of Code Day #3

In day 3 you have a ever repeating map with trees and free spaces. You move over this map and have to count how many trees (#) you will hit. Part 1 Given is a pattern in which you move right and down. In part 1 we start in the top left corner and always move 3 right and one down until we reach the last line. ..##.........##.........##.........##.........##.........##....... ---> #...#...#..#...#...#..#...#...#..#...#...#..#...#...#..#...#...#.. .#....#..#..#....#..#..#....#..#..#....#..#..#....#..#..#....#..#. ..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.# .#...##..#..#...##..#..#...##..#..#...##..#..#...##..#..#...##..#. ..#.##.......#.##.......#.##.......#.##.......#.##.......#.##..... ---> .#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....# .#........#.#........#.#........#.#........#.#........#.#........# #.##...#...#.##...#...#.##...#...#.##...#...#.##...#...#.##...#... #...##....##...##....##...##....##...##....##...##....##...##....# .#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.# ---> Since the map is repeating we need to reset the x position if we reach the end of the line in the given example. Theoretical you could achieve this with a simple modulo, but I did it without because I hadn’t it in mind when I was in a hurry. The rest of part 1 is very simple looping without any suprises. ...

December 3, 2020 · 2 min · 282 words · Robert

Advent of Code Day #2

In day 2 you were given a set of rules to be parsed first. The looked like this: 1-3 a: abcde 1-3 b: cdefg 2-9 c: ccccccccc Each line contains two numbers, a character and a password Part 1 In part 1 you have to check if the given character appears at least and at most times given by the numbers. Each password that matches this behavior is considered valid. Part 2 In part 2 you need to check if the given character is on one of the two given positions indicated by the numbers.

December 2, 2020 · 1 min · 95 words · Robert

Advent of Code Day #1

First day was fairly simple. You need to find the two-pair combination (part 1) that sums up to 2020 and the three-pair combination (part 2). Then simply multiply each of the numbers within the combination. The result is the solution for the puzzle. Unfortunately due to an outage day 1 will not result in any points on the leaderboards.

December 1, 2020 · 1 min · 59 words · Robert

Emgithub shortcode

During the upcoming AoC I want to post some small posts about each little puzzle. In preparation of this I was looking for a way in hugo to include and highlight source code from GitHub without copying it to each article. I discovered emgithub and wrote a little shortcode for it and you can find it here.

November 22, 2020 · 1 min · 57 words · Robert

Let's encrypt - Free, automated and open

Seit einiger Zeit gibt es nun schon Let’s Encrypt. Und seit einigen Wochen auch eine Betaphase die Anfang Dezember öffentlich wird. Ich fasse mich hier jetzt einfach mal kurz und zeige wie man sich in wenigen Schritten seine Zertifikate automatisiert generieren kann. Als ersten müssen wir natürlich den Client von Let’s Encrypt installieren - aktuell (und vermutlich wird das so bleiben) ist es nur per Api möglich Zertifikate zu erstellen. ...

November 17, 2015 · 3 min · 504 words · Robert

Netflix: Der erste Eindruck

Seit dem 16.09.14 ist Netflix nun auch in Deutschland erreichbar. Hochgelobt und heiß erwartet kann man nun auch Filme und Serien in Deutschland über das Streamingportal sehen. Ich habe mir schon im Vorfeld das Angebot in der US-Version angeschaut und hatte, wie viele andere auch, bedenken, dass das Angebot hier in DE doch stark verschmälert sein wird. Wer sich jetzt sorgt der sei beruhigt, so schlimm ist es nicht. Natürlich ist das Angebot - teilweise deutlich - kleiner als das ‘Original’. Nichts destro-trotz sind die Aushängeschilder wie House of Cards oder Orange is the new Black verfügbar. Auch in Deutsch. Im Gegensatz zu anderen Streaminganbietern sind alle Filme und Serien auch im O-Ton verfübar. ...

September 25, 2014 · 1 min · 207 words · Robert

Buffalo Linkstation entbricken

Heute hab ich es endlich geschafft meine fullbricked LinkStation zu retten. Nach einigem hin und her gab es dann vom Support doch mal eine sinnvolle Anleitung. Ich drösel das hier etwas auf, so das ihr eigentlich direkt loslegen könnt. Was genau war das Problem? Die LinkstationDuo (LS-WXL) speichert die Daten in irgendeinem völlig kaputten Dateisystem. Noch schlimmer ist eigentlich nur, dass dieses elegante Stück Hardware die Firmware auf den Festplatten speichert. Das ist solange kein Problem wie man keine oder nur eine Platte tauscht. Tauscht man nun aber beide hat man eine etwas zu klobig geratene, lichschwache Diskokugel die fröhlich mit Fehlercodes um sich wirft. ...

September 3, 2014 · 3 min · 431 words · Robert