Compare commits
24 Commits
test-rebas
...
7dfc00de47
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dfc00de47 | |||
| 0eebf3a31d | |||
| aee93687bb | |||
| f2747fbd46 | |||
| 6618f40bd4 | |||
| 58ed5018e6 | |||
| 814e3d23e1 | |||
| 7a0683f641 | |||
| 516f0af350 | |||
| 84b8f64803 | |||
| 91c98f4696 | |||
| 48d5d6e186 | |||
| 15d1c78d1e | |||
| 09b582c23a | |||
| 906bc71f67 | |||
| 8c6c719733 | |||
| 1f26a4fcbb | |||
| efc1117154 | |||
| 9fe79ece73 | |||
| 747e076c57 | |||
| 97112b5c2e | |||
| 781aecfeb1 | |||
| 7a3ac6c797 | |||
| 032e76ff94 |
96
README.html
Normal file
96
README.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<html>body><h2>--- Day 13: Transparent Origami ---</h2><p>You reach another volcanically active part of the cave. It would be nice if you could do some kind of thermal imaging so you could tell ahead of time which caves are too hot to safely enter.</p>
|
||||
<p>Fortunately, the submarine seems to be equipped with a thermal camera! When you activate it, you are greeted with:</p>
|
||||
<pre><code>Congratulations on your purchase! To activate this infrared thermal imaging
|
||||
camera system, please enter the code found on page 1 of the manual.
|
||||
</code></pre>
|
||||
<p>Apparently, the Elves have never used this feature. To your surprise, you manage to find the manual; as you go to open it, page 1 falls out. It's a large sheet of <a href="https://en.wikipedia.org/wiki/Transparency_(projection)" target="_blank">transparent paper</a>! The transparent paper is marked with random dots and includes instructions on how to fold it up (your puzzle input). For example:</p>
|
||||
<pre><code>6,10
|
||||
0,14
|
||||
9,10
|
||||
0,3
|
||||
10,4
|
||||
4,11
|
||||
6,0
|
||||
6,12
|
||||
4,1
|
||||
0,13
|
||||
10,12
|
||||
3,4
|
||||
3,0
|
||||
8,4
|
||||
1,10
|
||||
2,14
|
||||
8,10
|
||||
9,0
|
||||
|
||||
fold along y=7
|
||||
fold along x=5
|
||||
</code></pre>
|
||||
<p>The first section is a list of dots on the transparent paper. <code>0,0</code> represents the top-left coordinate. The first value, <code>x</code>, increases to the right. The second value, <code>y</code>, increases downward. So, the coordinate <code>3,0</code> is to the right of <code>0,0</code>, and the coordinate <code>0,7</code> is below <code>0,0</code>. The coordinates in this example form the following pattern, where <code>#</code> is a dot on the paper and <code>.</code> is an empty, unmarked position:</p>
|
||||
<pre><code>...#..#..#.
|
||||
....#......
|
||||
...........
|
||||
#..........
|
||||
...#....#.#
|
||||
...........
|
||||
...........
|
||||
...........
|
||||
...........
|
||||
...........
|
||||
.#....#.##.
|
||||
....#......
|
||||
......#...#
|
||||
#..........
|
||||
#.#........
|
||||
</code></pre>
|
||||
<p>Then, there is a list of <em>fold instructions</em>. Each instruction indicates a line on the transparent paper and wants you to fold the paper <em>up</em> (for horizontal <code>y=...</code> lines) or <em>left</em> (for vertical <code>x=...</code> lines). In this example, the first fold instruction is <code>fold along y=7</code>, which designates the line formed by all of the positions where <code>y</code> is <code>7</code> (marked here with <code>-</code>):</p>
|
||||
<pre><code>...#..#..#.
|
||||
....#......
|
||||
...........
|
||||
#..........
|
||||
...#....#.#
|
||||
...........
|
||||
...........
|
||||
-----------
|
||||
...........
|
||||
...........
|
||||
.#....#.##.
|
||||
....#......
|
||||
......#...#
|
||||
#..........
|
||||
#.#........
|
||||
</code></pre>
|
||||
<p>Because this is a horizontal line, fold the bottom half <em>up</em>. Some of the dots might end up overlapping after the fold is complete, but dots will never appear exactly on a fold line. The result of doing this fold looks like this:</p>
|
||||
<pre><code>#.##..#..#.
|
||||
#...#......
|
||||
......#...#
|
||||
#...#......
|
||||
.#.#..#.###
|
||||
...........
|
||||
...........
|
||||
</code></pre>
|
||||
<p>Now, only <code>17</code> dots are visible.</p>
|
||||
<p>Notice, for example, the two dots in the bottom left corner before the transparent paper is folded; after the fold is complete, those dots appear in the top left corner (at <code>0,0</code> and <code>0,1</code>). Because the paper is transparent, the dot just below them in the result (at <code>0,3</code>) remains visible, as it can be seen through the transparent paper.</p>
|
||||
<p>Also notice that some dots can end up <em>overlapping</em>; in this case, the dots merge together and become a single dot.</p>
|
||||
<p>The second fold instruction is <code>fold along x=5</code>, which indicates this line:</p>
|
||||
<pre><code>#.##.|#..#.
|
||||
#...#|.....
|
||||
.....|#...#
|
||||
#...#|.....
|
||||
.#.#.|#.###
|
||||
.....|.....
|
||||
.....|.....
|
||||
</code></pre>
|
||||
<p>Because this is a vertical line, fold <em>left</em>:</p>
|
||||
<pre><code>#####
|
||||
#...#
|
||||
#...#
|
||||
#...#
|
||||
#####
|
||||
.....
|
||||
.....
|
||||
</code></pre>
|
||||
<p>The instructions made a square!</p>
|
||||
<p>The transparent paper is pretty big, so for now, focus on just completing the first fold. After the first fold in the example above, <code><em>17</em></code> dots are visible - dots that end up overlapping after the fold is completed count as a single dot.</p>
|
||||
<p><em>How many dots are visible after completing just the first fold instruction on your transparent paper?</em></p>
|
||||
</bodi></html>
|
||||
11
README.md
11
README.md
@@ -1,4 +1,13 @@
|
||||
## test move git to subdir
|
||||
# title 1
|
||||
## title 2
|
||||
### title 3
|
||||
#### title 4
|
||||
#### title 4
|
||||
##### title 5
|
||||
##### title 5
|
||||
#### title 4
|
||||
## title 2
|
||||
# title 1
|
||||
|
||||
*** toto
|
||||
|
||||
|
||||
146
TEST.rst
Normal file
146
TEST.rst
Normal file
@@ -0,0 +1,146 @@
|
||||
.. |ss| raw:: html
|
||||
|
||||
<strike>
|
||||
|
||||
.. |se| raw:: html
|
||||
|
||||
</strike>
|
||||
|
||||
|ss| abc\ |se|\defg
|
||||
|
||||
Some thoughts on Eudyptula
|
||||
==========================
|
||||
|
||||
Working with linux-next
|
||||
-----------------------
|
||||
|
||||
Normally, we should follow Linux's branch, and add **linux-next**
|
||||
remote, as explained in `kernel.org
|
||||
help <https://www.kernel.org/doc/man-pages/linux-next.html>`__.
|
||||
|
||||
However, to build my own kernel for real usage, a stable one is much
|
||||
better, which tags are not in Linus's branch.
|
||||
|
||||
Adding Greg's stable branch remote branch would just be a pain in the
|
||||
ass.
|
||||
|
||||
However, I had this discussion on IRC:
|
||||
|
||||
::
|
||||
|
||||
2021/05/13 11:40 <bodiccea> I am currently using Linus's branch, with another remote (linux-next).
|
||||
For the first time, I would like to use "for real" the latest stable
|
||||
(as of today: 5.12.3), but I cannot find such tag. I just added "stable"
|
||||
remote (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git),
|
||||
and currently it is being updated. Is it the correct way to have both
|
||||
linux-next and a useable/stable kernel ?
|
||||
2021/05/13 12:12 <gregkh> bodiccea: yes.
|
||||
2021/05/13 12:12 <gregkh> bodiccea: you can just use that linux.git tree as I keep it up to date
|
||||
with Linus's tree every -rc release at the longest, and sometimes daily
|
||||
if I'm bored :)
|
||||
2021/05/13 12:13 * gregkh is reminded to go update it right now...
|
||||
|
||||
So, the better is to completely forget about Linus' branch. The
|
||||
procedure is therefore:
|
||||
|
||||
1. **Clone gregkh's stable blanch :**
|
||||
::
|
||||
|
||||
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
|
||||
Cloning into 'linux'...
|
||||
...
|
||||
|
||||
2. **Add a linux-next remote tracking branch :**
|
||||
::
|
||||
|
||||
$ cd linux
|
||||
$ git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
|
||||
|
||||
3. **Fetch linux-next and tags :**
|
||||
::
|
||||
|
||||
$ git fetch linux-next
|
||||
$ git fetch --tags linux-next
|
||||
|
||||
4. **Regular tracking :**
|
||||
::
|
||||
|
||||
$ git checkout master # to be safe
|
||||
...
|
||||
$ git remote update
|
||||
|
||||
Get latest versions
|
||||
-------------------
|
||||
|
||||
1. **Latest stable versions**
|
||||
::
|
||||
|
||||
$ git tag -l "v*" | grep -ve -rc | sort -V | tail -5
|
||||
v5.11.22
|
||||
v5.12
|
||||
v5.12.1
|
||||
v5.12.2
|
||||
v5.12.3
|
||||
|
||||
2. **Latest -rc versions**
|
||||
::
|
||||
|
||||
$ git tag -l "v*" | grep -e -rc | sort -V | tail -5
|
||||
v5.12-rc6
|
||||
v5.12-rc7
|
||||
v5.12-rc8
|
||||
v5.13-rc1
|
||||
v5.13-rc2
|
||||
|
||||
3. **Latest linux-next versions**
|
||||
::
|
||||
|
||||
$ git tag -l "next-*" | tail -5
|
||||
next-20210512
|
||||
next-20210513
|
||||
next-20210514
|
||||
next-20210518
|
||||
next-20210519
|
||||
|
||||
Kernel config (Ubuntu)
|
||||
----------------------
|
||||
|
||||
We should keep a .config somewhere, that we can use as a starting point
|
||||
for new kernels. Here: ../
|
||||
|
||||
Doc:
|
||||
* `issue with AD9467 <https://lkml.org/lkml/2021/3/18/1007>`__ (Fixed as of 5.12.5)
|
||||
* `issue with signed kernel <https://askubuntu.com/questions/1329538/compiling-the-kernel-5-11-11>`__
|
||||
|
||||
1. **First time, get latest Ubuntu kernel config file**
|
||||
::
|
||||
|
||||
$ cd linux
|
||||
$ git checkout TAG
|
||||
$ cp /boot/config-x.y.z-t-generic .config
|
||||
$ make olddefconfig
|
||||
|
||||
# disable trusted keys
|
||||
$ scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
|
||||
or: scripts/config --disable SYSTEM_TRUSTED_KEYS
|
||||
|
||||
$ cp .config ../kernel-config/$(git describe --tags)
|
||||
...
|
||||
|
||||
2. **Then, just update config for new versions**
|
||||
::
|
||||
|
||||
$ cd linux
|
||||
$ git checkout TAG
|
||||
$ cp ../kernel-config/TAG .config
|
||||
$ make olddefconfig
|
||||
or: make oldconfig
|
||||
...
|
||||
|
||||
Kernel build (deb package)
|
||||
--------------------------
|
||||
|
||||
::
|
||||
|
||||
$ cd linux
|
||||
$ make -j 2 bindeb-pkg LOCALVERSION=-bodi
|
||||
55
TODO.org
Normal file
55
TODO.org
Normal file
@@ -0,0 +1,55 @@
|
||||
#+OPTIONS: toc:nil
|
||||
|
||||
* NFSv4 with Kerberos on Debian from scratch
|
||||
#+BEGIN_QUOTE
|
||||
/(C)2022 Bruno Raoult./
|
||||
#+END_QUOTE
|
||||
/(C)2022 Bruno Raoult./
|
||||
|
||||
#+TOC: headlines 3
|
||||
|
||||
** part I
|
||||
#+CAPTION: and _multiple_
|
||||
#+CAPTION: lines of *captions*!
|
||||
#+ATTR_HTML: :class a b
|
||||
#+ATTR_HTML: :id it :class c d
|
||||
#+BEGIN_SRC sh
|
||||
echo "a bash source block with custom html attributes"
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** TODO NEXT STEPS
|
||||
|
||||
*** CANCELED memory: plan for total memory release (pool, etc...) to please valgrind.
|
||||
not so easy: need to keep track of allocated blocks, **and** to understand that no object is in use.
|
||||
*** TESTING move.c, piece.c: function to remove an element from list.
|
||||
*** TESTING position.c: duplicate fully a position (including board & piece list)
|
||||
**** TODO ~move.c~: Change piece position (board & piece list).
|
||||
|
||||
** TODO MISC
|
||||
- ~move_gen()~: ~doit~ is maybe redundant with test on current turn.
|
||||
- should board be included in position ?
|
||||
- Whill +this text+ be strikethrough ?
|
||||
|
||||
** part I
|
||||
#+CAPTION: and _multiple_
|
||||
#+CAPTION: lines of *captions*!
|
||||
#+ATTR_HTML: :class a b
|
||||
#+ATTR_HTML: :id it :class c d
|
||||
#+BEGIN_SRC sh
|
||||
echo "a bash source block with custom html attributes"
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** TODO NEXT STEPS
|
||||
|
||||
*** CANCELED memory: plan for total memory release (pool, etc...) to please valgrind.
|
||||
not so easy: need to keep track of allocated blocks, **and** to understand that no object is in use.
|
||||
*** TESTING move.c, piece.c: function to remove an element from list.
|
||||
*** TESTING position.c: duplicate fully a position (including board & piece list)
|
||||
**** TODO ~move.c~: Change piece position (board & piece list).
|
||||
|
||||
** TODO MISC
|
||||
- ~move_gen()~: ~doit~ is maybe redundant with test on current turn.
|
||||
- should board be included in position ?
|
||||
- Whill +this text+ be strikethrough ?
|
||||
Reference in New Issue
Block a user