mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 09:18:59 +00:00
Update structured notes on anything I use today
This commit is contained in:
parent
2c210a48ea
commit
373cfe52fe
@ -3,7 +3,7 @@
|
|||||||
:END:
|
:END:
|
||||||
#+title: Anki: 2021
|
#+title: Anki: 2021
|
||||||
#+date: "2021-05-01 20:20:25 +08:00"
|
#+date: "2021-05-01 20:20:25 +08:00"
|
||||||
#+date_modified: "2021-05-21 12:09:04 +08:00"
|
#+date_modified: "2021-05-21 12:39:01 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+property: anki_deck 2021
|
#+property: anki_deck 2021
|
||||||
#+property: header_args :exports both
|
#+property: header_args :exports both
|
||||||
@ -191,11 +191,30 @@ Implement a little bit of type checking in Bash.
|
|||||||
~printf~ throws an error if the given argument is not appropriate.
|
~printf~ throws an error if the given argument is not appropriate.
|
||||||
|
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
printf "%d" 532 429 40 102
|
# This is fine
|
||||||
printf "%d" this_will_throw_an_error 430 that_previous_number_will_not
|
printf "%d\n" 532 429 40 102
|
||||||
printf "%f" 10 43.45 3.14
|
|
||||||
|
# This will return a non-zero exit code
|
||||||
|
printf "%d\n" this_will_throw_an_error 430 that_previous_number_will_not
|
||||||
|
|
||||||
|
# This is also fine
|
||||||
|
printf "%f\n" 10 43.45 3.14
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+results:
|
||||||
|
#+begin_example
|
||||||
|
532
|
||||||
|
429
|
||||||
|
40
|
||||||
|
102
|
||||||
|
0
|
||||||
|
430
|
||||||
|
0
|
||||||
|
10.000000
|
||||||
|
43.450000
|
||||||
|
3.140000
|
||||||
|
#+end_example
|
||||||
|
|
||||||
* Emacs: The overview of buffers
|
* Emacs: The overview of buffers
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ANKI_NOTE_TYPE: Styled cards
|
:ANKI_NOTE_TYPE: Styled cards
|
||||||
@ -900,14 +919,16 @@ Give some functions for creating a conditional in Emacs Lisp.
|
|||||||
** Back
|
** Back
|
||||||
Below are the common way to control the flow with Elisp.
|
Below are the common way to control the flow with Elisp.
|
||||||
|
|
||||||
#+begin_src elisp :results none
|
#+begin_src elisp
|
||||||
(if (and nil nil)
|
(if (and nil nil)
|
||||||
(message "Hello there!")
|
"Hello there!"
|
||||||
(message "Not hello there, sith lord!"))
|
"Not hello there, sith lord!")
|
||||||
|
|
||||||
(unless t
|
(unless t
|
||||||
(message "Not hello there, sith lord!"))
|
"Not hello there, sith lord!")
|
||||||
|
|
||||||
(when t
|
(when t
|
||||||
(message "Hello there!"))
|
"Hello there!")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+results:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#+title: journalctl
|
#+title: journalctl
|
||||||
#+date: "2021-05-20 23:07:39 +08:00"
|
#+date: "2021-05-20 23:07:39 +08:00"
|
||||||
#+date_modified: "2021-05-20 23:27:03 +08:00"
|
#+date_modified: "2021-05-21 18:40:02 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+property: header-args :results none
|
#+property: header-args :results none
|
||||||
|
|
||||||
@ -35,20 +35,20 @@ Needs a comprehensive database of examples to fight against this scope.
|
|||||||
|
|
||||||
** Watch the logs from a specific unit at boot time
|
** Watch the logs from a specific unit at boot time
|
||||||
|
|
||||||
#+begin_src shell
|
#+begin_src
|
||||||
journalctl --user-unit borgbackup.service -fb
|
journalctl --user-unit borgbackup.service -fb
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Delete the logs older than a month
|
** Delete the logs older than a month
|
||||||
|
|
||||||
#+begin_src shell
|
#+begin_src
|
||||||
journalctl --vacuum-time=1m
|
journalctl --vacuum-time=1m
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** View the latest logs with helpful messages
|
** View the latest logs with helpful messages
|
||||||
|
|
||||||
#+begin_src shell
|
#+begin_src
|
||||||
journalctl -xe
|
journalctl -xe
|
||||||
#+end_src
|
#+end_src
|
||||||
|
32
structured/illustration.zine.org
Normal file
32
structured/illustration.zine.org
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#+title: Zines
|
||||||
|
#+date: "2021-05-21 18:43:12 +08:00"
|
||||||
|
#+date_modified: "2021-05-21 18:44:56 +08:00"
|
||||||
|
#+language: en
|
||||||
|
|
||||||
|
|
||||||
|
Stands for "fan-made magazines".
|
||||||
|
However, we're looking at programming zines similar to [[https://jvns.ca/][Julia Evans]] and [[https://twitter.com/sailorhg][sailorhg]].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Style guides
|
||||||
|
|
||||||
|
- 24px is the ideal size for the writing.
|
||||||
|
- Integrating text with multimedia, basically almost like a formal magazine or pure drawing in comics format.
|
||||||
|
- Will use Krita as the drawing tool.
|
||||||
|
Create a template for my mini-zines.
|
||||||
|
|
||||||
|
Things to consider (aside from personality, of course):
|
||||||
|
|
||||||
|
- One-line description
|
||||||
|
- The simplest example possible
|
||||||
|
- A real-life example
|
||||||
|
- Documentation links
|
||||||
|
- Alternatives
|
||||||
|
- Integration
|
||||||
|
|
||||||
|
Be sure to practice the following:
|
||||||
|
|
||||||
|
- Good typography practice (even in writing)
|
||||||
|
- An intuitive navigation (you know, like in comics/manga)
|
36
structured/linux.modules-with-dkms.org
Normal file
36
structured/linux.modules-with-dkms.org
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#+title: Installing Linux kernel with DKMS
|
||||||
|
#+date: "2021-05-30 17:40:35 +08:00"
|
||||||
|
#+date_modified: "2021-05-30 20:40:38 +08:00"
|
||||||
|
#+language: en
|
||||||
|
|
||||||
|
|
||||||
|
[[https://github.com/dell/dkms][Dynamic kernel module support]] (DKMS) is a feature that allows installation of kernel modules while reinstalling the kernel.
|
||||||
|
This is preferable if you don't want to build and install kernel modules every kernel update.
|
||||||
|
|
||||||
|
Oftentimes to build the kernel module, it is required to install Linux-related headers.
|
||||||
|
|
||||||
|
Here's an example scenario where I want to install [[https://github.com/jlam55555/veikk-linux-driver/issues/43][Veikk tablet driver]] that is not available out-of-the-box.
|
||||||
|
The following list is the summarized version of what should happen.
|
||||||
|
|
||||||
|
- Download the source code of the kernel module.
|
||||||
|
- Check if the Linux headers are available otherwise the kernel module cannot be built.
|
||||||
|
- Place the kernel module source into the kernel source tree (e.g., =/usr/src=).
|
||||||
|
- Create =dkms.conf= to tell where the module is to be built.
|
||||||
|
- Install the module with ~dkms~.
|
||||||
|
|
||||||
|
The most difficult out of the steps is configuring with =dkms.conf=.
|
||||||
|
You can see the format and the available options from =dkms.8= manual page.
|
||||||
|
For now, let's see the example configuration.
|
||||||
|
|
||||||
|
#+begin_src shell :results silent
|
||||||
|
PACKAGE_NAME="input-veikk"
|
||||||
|
PACKAGE_VERSION="git"
|
||||||
|
BUILT_MODULE_NAME[0]="veikk" # (ref:module-name)
|
||||||
|
DEST_MODULE_LOCATION[0]="/extra/"
|
||||||
|
AUTOINSTALL="yes"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
This tells ~dkms~ to install the Veikk driver, packaged as =input-veikk= with version =git=, in =extra/= (e.g., =/lib/modules/@LINUX_KERNEL_VERSION@/extra=).
|
||||||
|
When installed, you should see a module named [[(module-name)][=veikk=]] — e.g., see the module list with =lsmod=.
|
||||||
|
|
||||||
|
With the setup complete, run ~dkms install -m input-veikk -v git~ and it should be effective immediately.
|
Loading…
Reference in New Issue
Block a user