blog
https://evilcookie.de/ (RSS)
Local-only gitignore Red passenger traffic light in Munich. Taken while doing some street photography with flipez. tl;dr: Enable a local-only untracked gitignore file for all repos using the config option core.excludeFiles. Gitignore is a great way of excluding unwanted files from a git repository. Usually you want to track it within the repo and...
go yolo Green passenger traffic light in Munich. Taken while doing some street photography with flipez. tl;dr Go generics can be used to drop the error of two-return-value functions to enable chaining functions quickly: func Yolo[T any](value T, _ error) T { return value } func main(){ // Atoi has signature func(s string) (int, error) ...
on - run commands on file event On top of the Ulriken near Bergen in Norway from my last rl journey. Inspired from watch, on runs commands repeatedly but on file events likewise to inotifywait. Contents Getting started Origin story Rustlings Watch go lint Random go lint output File events Implementation Fsnotify Debounce events Getting started...
Ferris sweep split keyboard build I built a Ferris Sweep split keyboard originated from the Datenspuren 24 souvenirs. Having a bit soldering experience and hacking curiosity, this was/is a great rabbit hole to explore. Contents Starting point Preparation Components Tools Assembly Close jumper pads on the opposite side Orthogonal pin header...
Datenspuren 24 I’ve attended the Datenspuren 24 hosted by C3D2 in Dresden. Some data: location: Dresden-Pieschen Zentralwerk lot of talks, workshops and get together since 2004 focus: technology within society own payment system GNUTaler with the digital currency Spurlos Contents SculptOS - a novel operating system, truly trustworthy computing...
Writing blog posts - done is better than perfect I had a lot of blogs since I have access to the internet. Mostly unsuccessful in terms of continuously writing new posts. What is different with $this one? principles As stated in my first post, I started with the following principles: focus: CLI-only, no distractions simplicity: only the features...
Home office via hot spot tl;dr Working from home via hot spot isn’t as unreliable and traffic expensive as I thought. Pre-schedule suitable work and delay data intensive ones like meetings help along the way. I recently moved into a new flat and the technician appointment to enable my internet connection was still in the future. At the same time...
Bash - cheat sheet Contents Arguments Conditionals Colors Arguments variable description $0 name of the script $1 first argument $2 second argument $ argument, where n > 0 $@ all arguments as one string $# count of arguments Example #!/bin/bash echo script started with $# args: $@ for arg in "$@"; do echo "$arg" done # $ ./script.sh...
GopherCon Europe 2024 I attended the GopherCon Europe 2024 in Berlin1 to check out the latest GOssip2. Some data: date: 17.05. - 20.05. location: Alte Münze Berlin two tracks accidental pictures with the Go Team: (1) (2) Website Contents The Business of Go Rethinking domain-driven design Introduction Idea 1 - always keep valid state in memory...
working on the road - self experiment tl;dr: Self experiment about working on the road. It’s challenging but opens up new possibilities. I worked in the train and within a coffee. My productive comfort zone is behind a desk within an office having sparing partners for sharing and discussing ideas. Need more focus? Noise canceling headphones to...
Chemnitzer Linuxtage 2024 I attended the Chemnitzer Linuxtage 2024 and it was great fun1: date: 16.03.+17.03. 6 lecture halls lectures (german only regular ticket price: 12€ workshop price: 5€ Disclaimer as within my last conference: I’m paraphrasing (italic) the speaker based on my notes and memories as best as I can. Content Analoge Fotos mit...
ruby - get plain class/instance method list tl;dr: .methods - Object.methods Whenever I juggle with ruby classes or instances within a ruby REPL1, I had hard times to figure out their methods: > Time.methods => [:at, :now, :utc, :gm, :local, :mktime, :new, :allocate, :superclass, :, :=, :>=, :==, :===, :included_modules, ...
git force-push for professionals tl;dr: Use --force-with-lease instead of --force to avoid overwriting upstream changes. Introduction 1st git rule: don’t force-push. But as an atendee of the rebase-i-make-my-own-history club, force push is necessary. But nevertheless overwrites happen, especially when multiple people work on the same branch. This...
Ollama and codelama - enter the AI rabbit hole Ollama makes using models like codellama as easy to use as containers. I stumpled over it on hacker news and was cruious if it was as easy as claimed. Getting started download and install ollama: Linux: curl -fsSL https://ollama.com/install.sh | sh others: Download page pull e.g. Meta’s codellama...
let’s boot with riscv Let’s boot some C code1 with riscv64 using qemu: riscy2 After about half a year of os development abstinence. I fell into the riscv-os-dev-rabbit-hole. Those risc, arm, riscv buzzwords are in my news bubble for a while. Now it’s time to get my hands dirty. Contents RISC-V vs. ARM vs. ARM64 vs. AArch64 Getting started -...
execute c source files tl;dr: add //usr/bin/gcc "$0" && exec ./a.out "$@" to the first line of your example.c make executable: chmod +x example.c run it: ./example.c I’ve a folder called lab for those quick ‘n’ dirty programs to test some language features or other interesting behavior. While golang programs can be easily executed via go run and...
go integration tests with ginkgo and gomega Today, I’ve checked out the BDD1 testing framework ginkgo with the matcher library gomega for integration tests with go. The motivation was to find an alternative for my go-to testing framework rspec. Although in ruby, I anyway used it for go projects like blogctl. rspec - Were I came from Integration...
Continue interrupted uploads via dd skip While falling into the routing engine rabbit hole planing my next hiking trip via nextcloud maps, I needed to upload a big file to my server. Upload bandwidth sucked as it mostly does in Germany1. Well scp is my friend I guess: $ scp jakobsweg.tar.gz root@my.server:~/ lost connection Oops, after ten...
verbose v1.1.0 - example and edit support I recently got a new motivation to update my vocabulary service verbose. Each word can have an example sentence together with its translation now. Verbose has also a new edit page. Example support When learning new words it could be useful to have a helpful example. This adds more context to the...
Hola docker, mucho gusto!1 I’m currently learning Spanish for my next vacation2. While Duolingo does an impressive job of gamifying the learning process, I thought about combining this fairly unknown world with one that I’m familiar with. I use Linux and its utils a lot. I like to read man pages and I know a bunch of them. Why not switch the...
Hashsets in go tl;dr var hashSet map[string]struct{} Introduction The term HashSet is a data structure from the Java universe describing a value-less HashMap1. It is perfect when uniqueness is needed but avoids the overhead of a value. Using golang they can be constructed using an ordinary map and an empty struct: var hashSet map[key]struct{} Use...
How to rename files without specifying the path twice How to avoid mv /this/is/a/long/path/to/my/guinea/pig/trfel.pig /this/is/a/long/path/to/my/guinea/pig/trueffel.pig and just do something like /this/is/a/long/path/to/my/guinea/pig/trfel.file trueffel.pig? Maybe I’m totally off today1, or this naive question hasn’t a navie answer. Anyway, I...
measure downtime durations via icmp How long does it take for the failover mechanism to fail-over? How long does it take for my server to be up again? I recently had the challenge of measuring downtime durations. ping on the one hand “makes me see” when paket loss occurs and vanishes but lacks in aggregation. mtr on the other side aggregates the...
Godot Wild Jam 60 We1 participated at the Godot Wild Jam #60 with the theme malfunction and submitted Rebot Roboot: Repair your robotic companion after a failed firmware update. jam submission game source soundtrack: Mandarin Marshmallow one wildcard implemented: Mobius loop Your game starts and ends at the same point. Contents Idea Minigame...
linux file observability In linux, “everything” is a file1. Regardless if its a regular file, directory, socket or even a device. Know how to observe open files, attached to a process, can become quite handy for debugging a linux host. Files and file descriptors Observe Wich process opened the file? Which files do a process holding?2 Is my server...
blog update: customization Make your own customized blog using blogctl! With blogctl v1.0.0, all personal hard coded information are now configurable. They can be specified using the introduced blog.json in the root of the blog directory: { "version": 1, "author": "Raphael Pour", "title": "blog", "domain":"evilcookie.de", ...
manpage fulltext search man -K got you covered1: -K, --global-apropos Search for text in all manual pages. This is a brute- force search, and is likely to take some time; if you can, you should specify a section to reduce the number of pages that need to be searched. Search terms may be simple strings...
let’s boot Let’s boot some x86 code with qemu. I rediscovered osdev.org after 13 years of abstinence12 and started off with the plain-assembly babystep. Then I tried the C based bare-bones kernel to have a bit more convenience. Minimal working example Babystep - plain assembler Bare-Bones - C Findings Environment Memory Layout Resources Vision...
Godot Wild Jam 55 - zzZ I did my first solo submission at the godot wild jam 55 about the theme dreams and reached rank 29! It’s called zzZ where the player catches sheep to catch some z’s1. Some more facts: jam submission game source code two wildcards implemented: A fork in the road: four endings Kabom!: missed sheep explode Contents Idea...
blogstage - static web server in rust I was looking for a useful service-oriented Rust project where I can test my project standards1 and dive deeper into the language. I decided to replace the “caddy file server” that serves this blog. The result is called blogstage: Simple web server providing my static blog to the world. It can be used via...
Finish rustlings +----------------------------------------------------+ | You made it to the Fe-nish line! | +-------------------------- ------------------------+ \\/ ▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒ ...
Thinking tools aka fidget toys As my mind often needs something to do, I stumpled across fidget toys1 as an alternative of chewing finger nails and excessive chewing gum usage2. Anyway, I want to share my mostly self-printed thinking tools. My current ranking: infinite fidget cube: very satisfying to fold the cube infinitely many times joy...
Hello rust I finally checked out Rust and solved day one of last year’s advent of code. tl;dr: use std::fs::File; use std::io::{self, prelude::*, BufReader}; // https://stackoverflow.com/a/45882510 fn main() -> io::Result()> { // https://doc.rust-lang.org/std/vec/struct.Vec.html let mut calories = Vec::new(); let mut sum: i32 = 0; ...
femto - project showcase Femto is a minimal CLI text editor made in C with zero dependencies inspired by Antirez’s kilo editor. This retrospective contains all noteworthy progress made within this project starting from the idea until the ‘end’. I’ve created this post about a year ago, but never published it due to missing content/relevant...
Parametric eurorack blank plate with OpenSCAD I’ve designed a 3d-printable parametric eurorack blank plate including my artist name with OpenSCAD. Motivation After arranging the eurorack modules in a case there may be a bunch of gaps that can be filled using blank plates. Since eurorack is already a cost-intensive hobby1, I though about printing...
aoc2022-5 - generic stack This puzzle can be solved straight forward by implementing a stack and process the move instructions properly. Since it is past august 20221, let’s implement it with generics to make it type-independent: type Stack[T any] struct { items []T } The first array element of item is the bottom of the stack, while the last...
aoc22-1 - reaching for the stars (again) This year’s AoC starts right in the rain forest with a nutrition puzzle. Problem: Find the elves (one for part 1 and three for part 2) carrying the most calories. Solution: Part 1: Find the maximum sum. Part 2: Store all sums sorted in an array and sum the highest three. Stellar I created a utility lib for...
Rework of verbose Verbose is my vocabulary web service to memorize and look up new and interesting english words. Since I’m continuously containerize my services , I stumpled across this service depending on nginx, php and mysql. Verbose was intended to be a non-fancy and simple project, so I rather thought about the requirements and reworked a...
godot wild jam 48 - crack in the shell Johannes and I participated at the godot wild jam 48 having the theme moon. Our submission is Crack in the shell: A race against time in space. Will the oxygen last to get back to the base? jam submission game source soundtracks: Welcome to the moon, Wrong path Internals Dall-E Logo Since Johannes has a...
bye bye old blog raphaelpour.de > vim /etc/nginx/nginx.conf && systemctl restart nginx # redirect raphaelpour.de to evilcookie.de > echo "DROP DATABASE wordpress;" | mysql > rm -rf /var/www/wordpress It was time to let go of my longest running blog so far. Although archive.org dates back the first occurrence to 2016, the impressum says 2015. I...
Inside a C float Preface This post was originally published in my old blog raphaelpour.de on 12.01.2018. This was a great introduction of how memory gets intrpreted within a type system and how to look behind the magic. I’ve added the part IEEE 754 components. Article Handling with floats can be irritating while it is one of the non-integral...
Debugging C with gdb Preface This post was originally posted in my old blog raphaelpour.de on 06.02.2018. This is probably my most personally used blog post. Once in a while I need to investigate a coredump that got collected by systemd-coredump. Although the post covers only the tip of the debugging iceberg, it’s at least the tip from where you...
Saving Goats with Prolog Preface This post was originally posted in my old blog raphaelpour.de on 09.02.2018. Retrospectively this post is a pretty good insight of my artifical intelligence studies back then. Spoiler: You might have guessed it already… you won’t see any real goat in here1. This is about a planning problem and how we can solve it...
make - gitlab approve button I constructed the gitlab merge-request approve button as 3D model and printed it. The font is Sourcecode Pro, which I discovered from the public gitlab using the firefox developer console, but it still looks a bit off to the original one. Anyway, it fits nicely into a nerdy developer office. Next Since the feedback...
we are developers world congress 2022 I attended at the WeAreDevelopers world congress 2022 in Berlin. Some facts: date: 14.06. - 15.06. speakers: 250 atendees: 8000 regular ticket price 600€ Disclaimer: I’m paraphrasing (italic) the speaker based on my notes and memories as best as I can. Evolution of C++ - Bjarne Stroustrup We are all part of...
blog update: v0.3.0 Blogctl v0.3.0 is out! CI release automation navigation in posts (next, previous, home) syntax highlighting CI release automation blogctl can now be released pretty straight forward: add latest change to changelog1: task cangelog bump version and release it: task release That’s it! A tag pipeline will start and create a new...
clt 2022 - storage migration: schnell und einfach I just did my first public german talk Storage Migration: Schnell und einfach about transferring local storage fast and simple, last Saturday. The lecture got recorded and I’ll update this post with a link once published. Some data ~60 visitors presentation took ~30 min. interview took another ~10...
blog update: about me The confirmation of my CLT 2022 lecture triggered me to add more ‘about me’ to my blog. Originally I wanted to add static-site support to add a separate ‘about me’ page, but this would need a more sophisticated concept. So my intermediate solution was to just hard code a banner with a short introduction.
godot wild jam 42 - the ancient game of ur My mates1 and I participated at the 42. Godot Wild Jam with our submission The ancient Game of Ur. The theme was Ancient and we decided to interpret the ‘oldest known’ board game Royal game of Ur. We decided to do a 3D game playing against an AI. To fulfill the wildcard Mom I’m on TV2, we added four AI’s...
hcloud-ruby v1.0.3 I’m now contributing and maintaining the ruby gem hcloud, a client for the Hetzner Cloud API. As a first ‘official act’, we1 tidied the repo up a bit and released v1.0.3. Changes set up a working CI, shifting from travis2 to github actions support ruby 3.0+3.1 credits to Holger https://news.ycombinator.com/item?id=25338983
git: split commits Is that branch commit list familiar to you? pick a70ebde big commit with major feature update pick e561140 minor change pick e3dfbbe minor change pick 5648ef4 minor change That one big commit a70ebde that should better be several smaller ones? edit commit via rebase: git rebase -i replace pick with edit or e of the big commit...
blog update: navigation Blogctl now renders navigation links per post: previous post: up to the index next post: > Motivation Although I’ve added the feature request over a year ago, now was the right time to implement it. Since a lot of projects vanish or get stale due to lack of motivation, I want to develop blogctl and my blog differently....
AoC 2021 day 9 - 3D print of cave height map After solving the puzzle of day 9 about a cave with basins and heights from 0 to 9, we1 thought about 3D printing the input as height map. Go program I generated an STL model using the puzzle input as list of lines: func renderSTL(input []string) { filename := "day09.stl" // list of all generated...
blog update: image support blogctl now supports images. Concept Images can be placed inside the post folder and embedded via the IMAGE() tag. The renderer automatically: converts all tags to html copies the images to the output directory adds the post title as suffix to the filename. Last one is needed to avoid naming conflicts, having duplicate...
firefox: disable download dialog delay When downloading files with firefox, the ok button of the file-dialog stays disabled for a few seconds. This bugged me a dozen of times. I looked around the config and found a ‘solution’: goto about:config set security.dialog_enable_delay to 0 Downside On researching about the config value, it’s existing...
blog update: rss feed Blogctl now generates an rss feed along with the site. Motivation Since I started to read HackerNews on a daily basis, I found a bunch of blogger that I wanted to keep track of without polling. RSS seemed the right solution for this type of problem. I use the firefox extension feedbro to manage and read my feeds1. This...
bad practice: busy-waiting Busy-waiting is one of the easiest ways of exhausting a cpu1: package main func main() { for true { /* complex logic */ } } What looks like an obvious bad construct one would never do by accident is often introduced on waiting for a resource or state change. One common place where such constructs are used is on...
Read this blog with emacs Download and install emacs start emacs press meta+x where meta may either ctrl or alt type eww type evilcookie.de hit return enjoy the blog: navigate: arrow keys visit links: return go back: l
–version always Am I in the matrix? Which sounds like a quote is the result of hours testing and debugging with development releases. When things get messy and intransparent, it’s always good to have a --version printing some build information. Where build information is defined as date and version in this post. Since version control is a...
AoC day7 Today’s puzzles were about bags which contain a certain amount of other bags (and so on) based on the rules from the input. The first one asks for the amount of different bags in which our -shiny gold- one is contained. The second one asks for the count of bags the own contains. Abstraction Let’s say each bag is a node and each rule is...
AoC day 1 The puzzles of day one were easy to solve in the first place, but have more potential to optimize than I thought. Problem Find n addends which add up to 2020. Solution of the puzzle is the product of all addends where n=2 in puzzle one and n=3 in puzzle two. Solution The idea was to find all unique subsets with n elements, where n=2 in...
AoC The annual advent-of-code challenge is starting again at first of December. Ruby was my last years choice of language, which I also used to do the 2015 event for preparation. This year I go with Go since the majority of my daily projects are Go ones. My goal is to give each puzzle a serious try and write a post about interesting solutions....
Hello internet This blog is managed via blogctl and served via caddy container half-automatic. I build blogctl and the edit-and-publish workflow having the following things in mind: focus: CLI-only, no distractions simplicity: only the features currently needed minimalism: focus on content and not style That’s my premise for writing blog posts at...