<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>rixx.de (Posts about hack)</title><link>https://rixx.de/</link><description></description><atom:link href="https://rixx.de/categories/hack.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Wed, 19 Feb 2025 15:35:18 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>∞ Tannenbaum!</title><link>https://rixx.de/blog/tannenbaum/</link><dc:creator>rixx</dc:creator><description>&lt;p&gt;&lt;/p&gt;&lt;div class="header-image bordered   post-image"&gt;
    &lt;img src="https://rixx.de/img/tannenbaum/tannen.png" title=""&gt;
    &lt;div class="post-image-caption"&gt; &lt;a href="https://ootannenbaum.rixx.de"&gt;Source.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On the first Sunday of Advent, my siblings (13 &amp;amp; 15) and I got busy building Christmas trees – but not out of wood! We
made &lt;em&gt;generative art&lt;/em&gt;. You can see the result at &lt;a href="https://xn--7j8h.rixx.de"&gt;🎄.rixx.de&lt;/a&gt; (fallback for the less
unicode-savvy: &lt;a href="https://ootannenbaum.rixx.de"&gt;ootannenbaum.rixx.de&lt;/a&gt;), where you can generate your own random Christmas
trees.&lt;/p&gt;
&lt;p&gt;That's already pretty cool, in my admittedly biased opinion. What's even cooler though is how we got there: While I did
all the typing, everything else was a collaboration. All the research, ideas, testing, calculations that went into this,
roughly four hours of joint generative Christmas. What we did can work for others, too, so this is a writeup of what we
did, how this works, and how to tackle generative processes like these. It's much easier than it may look if you haven't
done something like this before!&lt;/p&gt;
&lt;h4 id="resources"&gt;Resources&lt;/h4&gt;
&lt;p&gt;First of all: You can look up all the details of how the Christmas tree is made. &lt;a href="https://github.com/rixx/ootannenbaum/blob/master/js/tannenbaum.en.js"&gt;This
file&lt;/a&gt; contains all the code, and it's &lt;em&gt;heavily&lt;/em&gt;
commentated (close to be its own blog post). The comments walk through the code and explain in plain English what's
going on. If you leave out the ".en" in the URL, you'll find the same in German (which is the version we actually
wrote).&lt;/p&gt;
&lt;p&gt;If you haven't done anything remotely similar before, there is a &lt;a href="https://media.ccc.de/v/35c3-1-generative-art-with-paper-js"&gt;great
introduction&lt;/a&gt; in German by the equally great
&lt;a href="https://bleeptrack.de"&gt;bleeptrack&lt;/a&gt;. &lt;a href="https://www.youtube.com/watch?v=hwVe9ZU_prw"&gt;This&lt;/a&gt; is a similar talk in English.
You'll find more links and resources at the end of this page.&lt;/p&gt;
&lt;h4 id="prior-knowledge"&gt;Prior knowledge&lt;/h4&gt;
&lt;p&gt;What level of prior knowledge do you need to build something like this? Don't worry, it's not all that much! A bit of
perseverance &lt;em&gt;or&lt;/em&gt; knowledge of a bit of any programming language &lt;em&gt;or&lt;/em&gt; somebody who can program and is willing to help
you should show you through. If you don't know anybody who can help you, look for local hackerspaces, programming
courses, or ask around online when you hit stumbling blocks. Given concrete questions, there should be people around who
can help.&lt;/p&gt;
&lt;p&gt;For reference: my brother is 15, has learned some Java (and a tiny bit of HTML) at school, and had no problems following
our progress. My sister is 13, and has no programming experience at all. She still understood what we did as well,
especially the design and work on the parameters to get to a balanced result.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div class="header-image bordered   post-image"&gt;
    &lt;img src="https://rixx.de/img/tannenbaum/hack.jpg" title=""&gt;
    &lt;div class="post-image-caption"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h4 id="process"&gt;Process&lt;/h4&gt;
&lt;p&gt;When starting out with a generator like this, it's best to start simple: Think of the basic form hidden in what you're
trying to do, and try to get it to show up in the live editor at &lt;a href="https://sketch.paperjs.org"&gt;sketch.paperjs.org&lt;/a&gt;.
For example: to draw a rectangle, you can copy the code below and click the “run” button at the top:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Rectangle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Point&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;100&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;300&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fillColor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"red"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;strokeColor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"black"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;strokeWidth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As somebody who speaks English, you have an advantage, because this is pretty self-explanatory for you. It draws a
rectangle at the coordinate (100, 100). Note that (0, 0) is the top left corner. The first number is the x value, which
changes how far something is moved to the right, and the second number is the y value, which moves elements further
down.&lt;/p&gt;
&lt;p&gt;The rectangle takes up 200x300 pixels, and filled with red colour with a 5 pixel black border. Finally, we rotate it by
45°. Now try to play around with it a bit! You can read up on all the other possibilities in the
&lt;a href="https://paperjs.org/reference/rectangle/"&gt;documentation&lt;/a&gt;. Don't worry if it's hard to read at first, that's completely
normal when approaching technical documentation. It's best to get started by reading the documentation for some part
that you know already, to figure out the structure and language. For example, search for
&lt;a href="http://paperjs.org/reference/path/#rotate-angle"&gt;“rotate”&lt;/a&gt; to see the description of the rotation of an object.&lt;/p&gt;
&lt;p&gt;For our Christmas tree, we started out by drawing triangles on top of each other. So we had to figure out the triangle
coordinates, so that the point on top was centered between the other two. We started out on paper to make sure we
understood the coordinate system, and then transfered our result to the paper.js editor. Then we played around with the
numbers until we could draw first one, then several triangles.&lt;/p&gt;
&lt;h4 id="advice"&gt;Advice&lt;/h4&gt;
&lt;p&gt;The most important piece of advice is: proceed in &lt;strong&gt;very small steps&lt;/strong&gt;. After each change, take a look at the results
and if they match your expectations. The nice thing about a graphical project like this is that you can see if your code
works as expected, and if it doesn't, the results are often very funny. More than once we generated trees that were
unreasonably tiny, or huge, entirely transparent, or upside down!&lt;/p&gt;
&lt;p&gt;Small steps could be: Draw one element. Draw another element. Add colour. Add a third element in a different colour.
Change the width of the element. Make the width random. Make the amount of elements random. And so on.&lt;/p&gt;
&lt;p&gt;The second most important piece of advice is: &lt;strong&gt;learn from others&lt;/strong&gt;. The vaaaaaaaast majority of problems in this area
have been encountered and presumably solved by others. It's good to try on your own at first – that way you learn more
about the problem and its complexities. But if you can't find a solution soon, instead of growing frustrated: Search
(e.g. on GitHub) for people with similar code and hopefully solutions. We did this a couple of times – for instance, the
code to export the generated trees to PNG and SVG images is taken directly from a similar generator by
&lt;a href="https://bleeptrack.de"&gt;bleeptrack&lt;/a&gt;. And now you can look up similar things in turn in our extensively commented code.&lt;/p&gt;
&lt;h4 id="randomness"&gt;Randomness&lt;/h4&gt;
&lt;p&gt;After some time and experimenting, you'll end up with a drawing. Now you can add in the part that's the most fun:
Randomness! It's not terribly easy, but a lot of fun, and will reward you with unexpected results.&lt;/p&gt;
&lt;p&gt;JavaScript has a function named &lt;code&gt;Math.random()&lt;/code&gt;, which returns a long number between 0 and 1. We built a small helper
function which returns a &lt;strong&gt;random number&lt;/strong&gt; between its parameters:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;randomNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;min&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// This function produces a random number between min and max.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// Min is inclusive, max is exclusive.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;min&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;min&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Feel free to copy this function, because building on this it's way easier to get started. Now you can do things like
make your drawing between 100 and 300 pixels wide, or make it rotate by 45°-90°. You can also use this like dice or
throwing a coin to choose between different features. We only draw a star on top of our Christmas tree for two out of
three trees, by calling &lt;code&gt;randomNumber(0, 3)&lt;/code&gt;, and only drawing a star if the result is not 0.&lt;/p&gt;
&lt;h4 id="colour"&gt;Colour&lt;/h4&gt;
&lt;p&gt;The &lt;strong&gt;size&lt;/strong&gt; of a drawing is the best first approach to randomness. It will make you think about some measurements some
more: If parts of your drawing border a random part, they need to be positioned correctly, so you'll have to add some
calculations for that. If this gets boring, you can also vary the &lt;strong&gt;colour&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Colours in paper.js and in many other digital systems are made up of three parts: red, green, and blue (the &lt;strong&gt;RGB&lt;/strong&gt;
system). These values are often on a scale from 0 to 255.  paper.js uses values between 0 and 1 instead – but because I
found it harder to reason about small numbers like that, we chose numbers in the [0, 255] range and divided them by 256,
instead. This is how we determine the green colour of a tree:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;red&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;randomNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;256&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;green&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;randomNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;115&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;255&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;256&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;randomNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;130&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;256&lt;/span&gt;
&lt;span class="nx"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fillColor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;red&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;green&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;So how do we find these colour ranges? How do we know that our red value should be between 0 and 100? If you search for
&lt;a href="https://duckduckgo.com/?q=colourpicker&amp;amp;atb=v102-1&amp;amp;ia=answer"&gt;Colourpicker&lt;/a&gt; in the search engine of your choice, you
should find an interactive colourpicker, often as part of the search result page. If you move the colour point in the
area that looks good to you, you can pay attention to the way the three values change, and which range is appropriate
for each of them. This is way easier if you're not alone, by the way, because one of you can focus on moving the point
    in a good colour space, and the other can write down the values. Afterwards, you can finetune the colours, e.g. if
    you notice that your colours tend to come out too blue, you can reduce the upper limit of your blue range.&lt;/p&gt;
&lt;h4 id="further-reading"&gt;Further reading&lt;/h4&gt;
&lt;p&gt;And this is how you can get started with generative art! I hope this helps to get you (or people you know) started. Have
fun!&lt;/p&gt;
&lt;p&gt;This is a list of &lt;strong&gt;sources&lt;/strong&gt; and &lt;strong&gt;further reading&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ootannenbaum.rixx.de"&gt;ootannenbaum.rixx.de&lt;/a&gt;, the Christmas tree generator.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rixx/ootannenbaum"&gt;The source code&lt;/a&gt; with extensive comments (look for the &lt;code&gt;tannenbaum.en.js&lt;/code&gt;
  file for English comments and code).&lt;/li&gt;
&lt;li&gt;By bleeptrack&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bleeptrack.de"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://beetles.bleeptrack.de/"&gt;Beetle generator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://overflower.bleeptrack.de/"&gt;Flower generator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cccamp19.bleeptrack.de/"&gt;Rocket generator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sketch.paperjs.org/"&gt;paper.js editor&lt;/a&gt;, where you can test your code live in your browser&lt;/li&gt;
&lt;li&gt;&lt;a href="http://paperjs.org/"&gt;paper.js documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/generative/top/"&gt;Examples and ideas&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><category>hack</category><category>tutorial</category><guid>https://rixx.de/blog/tannenbaum/</guid><pubDate>Tue, 10 Dec 2019 01:16:14 GMT</pubDate></item><item><title>Goodreads → SQLite</title><link>https://rixx.de/blog/goodreads-sqlite/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;Books! Disappearing into books is great, and I have well-founded suspicions that it's occasionally the only thing that
keeps me fit for human company. I like to share my opinions of the books I read – mostly so that I can look it up in a
couple of months or years, but also for the small-but-steady troupe of interested people. This usually takes the form of
my &lt;a href="https://rixx.de/categories/c-books/"&gt;monthly book blog post&lt;/a&gt; – but now, you can see &lt;a href="https://data.rixx.de/books"&gt;the raw
data&lt;/a&gt;, too!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div class="header-image bordered   post-image"&gt;
    &lt;img src="https://rixx.de/img/goodreads-sqlite/demo.gif" title="Using goodreads-to-sqlite"&gt;
    &lt;div class="post-image-caption"&gt;Using goodreads-to-sqlite &lt;a href="https://github.com/rixx/goodreads-to-sqlite"&gt;Source.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/goodreads-sqlite/"&gt;Read more…&lt;/a&gt; (6 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>books</category><category>hack</category><category>python</category><guid>https://rixx.de/blog/goodreads-sqlite/</guid><pubDate>Sun, 13 Oct 2019 00:28:43 GMT</pubDate></item><item><title>Exporting Bookmarks from FBReader</title><link>https://rixx.de/blog/exporting-bookmarks-from-fbreader/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="header-image bordered   post-image"&gt;
    &lt;img src="https://rixx.de/img/exporting-bookmarks-from-fbreader/header.png" title="Old illustration of an old man carrying a lot of books in his arms"&gt;
    &lt;div class="post-image-caption"&gt;Carrying all those books is something I sure don't miss. &lt;a href="https://flic.kr/p/ie29Lf"&gt;Source.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I read a lot, and I read a lot across different devices. Usually, I have at least a book open on my Kindle, and one on
my mobile phone. I also like to highlight passages that make me laugh, or think, or that touch me in some way. I collect
some of those quotes in a &lt;code&gt;fortune(6)&lt;/code&gt; file for further usage: Put it on login shells, share it with friends, use it as
a tongue-in-cheek &lt;a href="https://patreon.com/rixx"&gt;Patreon reward&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Kindle just drops your highlights into a plain text file with a very readable structure, which is very pleasant to
work with. It turned out that my Android reader app, &lt;a href="https://fbreader.org/android"&gt;FBReader&lt;/a&gt; isn't nearly so
cooperative, so this post documents how to extract the data from an unrooted phone.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/exporting-bookmarks-from-fbreader/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>android</category><category>books</category><category>hack</category><category>sql</category><guid>https://rixx.de/blog/exporting-bookmarks-from-fbreader/</guid><pubDate>Fri, 19 Jul 2019 14:14:02 GMT</pubDate></item><item><title>127.257 and other fun legacy IP addresses</title><link>https://rixx.de/blog/fun-legacy-ip-addresses/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="header-image bordered   post-image"&gt;
    &lt;img src="https://rixx.de/img/fun-legacy-ip-addresses/header.png" title="A shield, divided into many squares, filled with 0s and 1s. Illustration from an old book."&gt;
    &lt;div class="post-image-caption"&gt;I think I'm taking up a coat of arms. &lt;a href="https://www.flickr.com/photos/britishlibrary/11059861443/"&gt;Source.&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;IPv6, the addressing scheme of the future, has been lacking adoption for decades now. Its complexity is an often cited
reason: What's with the different kinds of addresses? What's &lt;code&gt;fe80&lt;/code&gt; supposed to be? And you can't even compare them
properly, what with those pesky &lt;code&gt;::&lt;/code&gt; contractions!&lt;/p&gt;
&lt;p&gt;Though … did you know that &lt;code&gt;127.257&lt;/code&gt; is interpreted as a valid IPv4 address by programs such as &lt;code&gt;ping&lt;/code&gt; and your browser?
Let's look into this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/fun-legacy-ip-addresses/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>hack</category><category>ip</category><guid>https://rixx.de/blog/fun-legacy-ip-addresses/</guid><pubDate>Fri, 12 Jul 2019 13:49:01 GMT</pubDate></item><item><title>Street Orientation Charts</title><link>https://rixx.de/blog/street-orientantions/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;Geoff Boeing recently released two &lt;a href="http://geoffboeing.com/2018/07/city-street-orientations-world/"&gt;blog&lt;/a&gt; &lt;a href="http://geoffboeing.com/2018/07/comparing-city-street-orientations/"&gt;posts&lt;/a&gt; showing off how the &lt;a href="http://geoffboeing.com/2018/03/osmnx-features-roundup/"&gt;OSMnx&lt;/a&gt; library can be used to show in which directions a city's streets go most often.&lt;/p&gt;
&lt;div class="post-image"&gt;
&lt;img src="https://rixx.de/img/street-orientations/wien.png" title="Vienna"&gt;
&lt;div class="post-image-caption"&gt;Oh look, it's vienna&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://rixx.de/blog/street-orientantions/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>hack</category><guid>https://rixx.de/blog/street-orientantions/</guid><pubDate>Sat, 14 Jul 2018 20:30:00 GMT</pubDate></item><item><title>Badge Manufacturing Howto</title><link>https://rixx.de/blog/badge-manufacturing-howto/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;This year, I had the pleasure of running &lt;a href="https://2018.djangocon.eu"&gt;DjangoCon Europe&lt;/a&gt; in Heidelberg, as part of a wonderful &lt;a href="https://2018.djangocon.eu/team/"&gt;team&lt;/a&gt;. As a part of our effort to make DjangoCon Europe feel special, and to make our attendees feel welcomed, I decided to manufacture the badges for nearly 400 attendees myself. This is my story in eight simple steps. (Sing to me of the man, Muse …)&lt;/p&gt;
&lt;div class="post-image"&gt;
&lt;img src="https://rixx.de/img/badge-manufacturing-howto/ideal.jpg" title="On the left: Badges piled into the laser. On the right: Finished badges stacked up"&gt;
&lt;div class="post-image-caption"&gt;What I thought the process would look like&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://rixx.de/blog/badge-manufacturing-howto/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>django</category><category>djangocon</category><category>djangoconeu</category><category>djangoconeu18</category><category>hack</category><category>python</category><guid>https://rixx.de/blog/badge-manufacturing-howto/</guid><pubDate>Sun, 27 May 2018 13:20:00 GMT</pubDate></item><item><title>Building a Windows install medium on Linux</title><link>https://rixx.de/blog/building-a-windows-install-medium-on-linux/</link><dc:creator>rixx</dc:creator><description>&lt;h3 id="the-problem"&gt;The problem&lt;/h3&gt;
&lt;p&gt;Imagine you were living in a Linux-only world, and suddenly felt the urgent need to install Windows on a laptop, for reasons entirely your own and not up for debate. (I'll get into that in a different post, promise.) Now, seeing as you have probably installed your fair share of Linux systems, and/or created rescue systems (either urgently required or due to painful experience and resulting paranoia), you download the image file, and use a tool of your choice, maybe &lt;code&gt;dd&lt;/code&gt;, to put the &lt;code&gt;.iso&lt;/code&gt; onto a USB drive, as you are used to doing. You put the drive into the PC and … it doesn't accept it as a boot device.&lt;/p&gt;
&lt;h3 id="the-solution"&gt;The solution&lt;/h3&gt;
&lt;p&gt;Now, since you're not me, you won't first debug partition table fuckups, and figure out how exactly UEFI relates to GPT vs MRB partition tables. Instead, you'll quickly figure out that apparently Windows &lt;code&gt;.iso&lt;/code&gt;s are not made for easy booting and require some more magic. There are two ways to provide this magic on Linux:&lt;/p&gt;
&lt;h4 id="the-easy-way"&gt;The easy way&lt;/h4&gt;
&lt;p&gt;Since you already have a Windows image on your Linux Desktop – just use that image to create a Virtual Machine, and then use the proper Windows tooling to put it onto the USB drive. It's overly complex, but it just works, and had I thought of this, it would have saved me quite some trouble.&lt;/p&gt;
&lt;h4 id="the-linux-way"&gt;The Linux way&lt;/h4&gt;
&lt;p&gt;But maybe you don't have virtualization software set up already, or you don't want to use it, or you want to get this to work on Linux &lt;em&gt;on principle&lt;/em&gt;, this is what you do: You get yourself a copy of &lt;a href="https://github.com/slacka/WoeUSB"&gt;WoeUSB&lt;/a&gt;, and either use their GUI (&lt;code&gt;woeusbgui&lt;/code&gt;) or their command line tool (&lt;code&gt;woeusb&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Caveat:&lt;/strong&gt; &lt;code&gt;sudo woeusb --device Windows10.iso /dev/sdb&lt;/code&gt; did not work for me. Instead I had to wipe the USB drive, make a new partition and a GPT partition table (use any old tool like &lt;code&gt;gparted&lt;/code&gt;), and then run &lt;code&gt;sudo woeusb --partition Windows10.iso /dev/sdb1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Caveat 2:&lt;/strong&gt; Microsoft does not provide checksums for their downloads, and apparently the installers don't or don't completely check their integrity. If the installation process starts, then aborts for weird reasons, try another download.&lt;/p&gt;</description><category>hack</category><category>tutorial</category><guid>https://rixx.de/blog/building-a-windows-install-medium-on-linux/</guid><pubDate>Wed, 27 Sep 2017 21:15:00 GMT</pubDate></item><item><title>Ligretto</title><link>https://rixx.de/blog/ligretto/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;h3 id="the-setting"&gt;The Setting&lt;/h3&gt;
&lt;p&gt;Because my friends are the most enduring people there are, they indulged me
and played several hours of &lt;a href="https://en.wikipedia.org/wiki/Ligretto"&gt;Ligretto&lt;/a&gt; with me
on my birthday. Yay! We had decided early on that we would play until somebody reached
a total score of either 100 or -100 points.&lt;/p&gt;
&lt;p&gt;Because my friends are nerds, as the hours passed we noticed that we were generating the
most interesting data, and we'd have to look at it later on.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/ligretto/"&gt;Read more…&lt;/a&gt; (20 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>hack</category><guid>https://rixx.de/blog/ligretto/</guid><pubDate>Wed, 02 Nov 2016 10:01:00 GMT</pubDate></item><item><title>AOSA4 - 500 lines or less</title><link>https://rixx.de/blog/aosa4-500-lines-or-less/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;This is my review and summary of the latest &lt;a href="http://aosabook.org/en/index.html"&gt;AOSA&lt;/a&gt; book "500 Lines or Less", where
experienced programmers solve interesting problems in short(-ish) programs. The book is available for free online, but
if you are interested and can afford it, please consider &lt;a href="http://aosabook.org/en/buy.html#fh"&gt;buying&lt;/a&gt; the PDF or
paperback versions.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/aosa4-500-lines-or-less/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>hack</category><guid>https://rixx.de/blog/aosa4-500-lines-or-less/</guid><pubDate>Sat, 16 Jul 2016 00:00:00 GMT</pubDate></item><item><title>CSAW 2014 Writeup: pybabbies</title><link>https://rixx.de/blog/csaw-2014-writeup-pybabbies/</link><dc:creator>rixx</dc:creator><description>&lt;div&gt;&lt;p&gt;At the recent &lt;a href="https://ctf.isis.poly.edu/challenges#"&gt;CSAW14&lt;/a&gt; I participated with the &lt;a href="http://krebsco.de/writeups/index.html"&gt;krebs&lt;/a&gt; team. Sadly, I had only little time for the CTF, but I managed to complete one task nonetheless. It was called &lt;strong&gt;pybabbies&lt;/strong&gt;, belonged to the category &lt;strong&gt;Exploitation&lt;/strong&gt; and yielded &lt;strong&gt;200&lt;/strong&gt; points (on a scale from 100 to 500).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://rixx.de/blog/csaw-2014-writeup-pybabbies/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>hack</category><guid>https://rixx.de/blog/csaw-2014-writeup-pybabbies/</guid><pubDate>Tue, 30 Dec 2014 23:00:00 GMT</pubDate></item></channel></rss>