Compare commits

..

10 Commits

Author SHA1 Message Date
kevinj
9535db9cce Update website design 2024-07-29 14:54:31 +02:00
5324c7d262 Update website design 2024-07-24 21:30:19 +02:00
7b1ecf9e2d Add Floppies post 2024-04-25 23:34:58 +02:00
91c8bc1435 Fix tags x2 2024-03-26 23:09:09 +01:00
8e89d83008 Fix tags 2024-03-26 23:07:32 +01:00
585371a190 Fix RSS feed 2024-03-26 23:04:57 +01:00
1e2433159f Apply a simpler theme and clear the content 2024-03-26 22:51:04 +01:00
0a54ff0503 Add "Information Scarcity" post 2024-03-01 22:15:33 +01:00
7c19bd97a1 Add "OpenSSL Notes" post 2024-02-24 18:58:38 +01:00
9f66c97cd7 Add "The Hacker Mindset" post 2024-02-24 16:59:01 +01:00
147 changed files with 1386 additions and 4542 deletions

3
README Normal file
View File

@ -0,0 +1,3 @@
+==========+
| blog |
+==========+

View File

@ -1 +0,0 @@
# Blog

View File

@ -1,34 +1,8 @@
baseURL = "https://0xdeadbeer.neocities.org"
title = "0xdeadbeer"
theme = "ficurinia"
title = "Kevin J."
theme = "minth"
languageCode = "en"
defaultContentLanguage = "en"
summaryLength = 20
copyright = "Kevin Jerebica 2022"
[params]
#author = "Kevin Jerebica"
description = "Coding, Cyber Security, Unix, Psychology, Japan 🤍"
posts = "posts"
logo = "/logo-scaled.png"
favicon = "/logo-scaled.png"
faviconIco = "/logo-scaled.png"
appletouch = "/logo-scaled.png"
svgicon = "/logo-scaled.png"
icon512 = "/logo-scaled.png"
imageInArticlePreview = false
showTags = false
[menu]
[[menu.icons]]
identifier = "github"
name = "Github"
url = "https://github.com/0xdeadbeer"
weight = 10
[[menu.icons]]
identifier = "youtube"
name = "Youtube"
url = "https://youtube.com/@0xdeadbeer"
[markup.goldmark.renderer]
unsafe=true

BIN
content/images/cliff.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -3,10 +3,13 @@ title: "About Me"
date: 2023-04-08T19:24:58+02:00
---
Hello dear visitor! My name is Kevin. I'm from Slovenia and I have a strong passion for reading, programming, cyber security, languages, and much more!
I am Kevin Jerebica. At this time I reside in Slovenia and I have a strong passion for
programming, cyber security, data protection, languages, reading and learning about the world.
I study Japanese (or at least I like to think so). I deeply care about software
freedom and so I primarily like to deal with free and open-source software
solutions. Many of my ideas and goals come from my love towards space. I cannot
stop dreaming about it.
Over the last couple of years I've been investing a lot of time into Linux, server management, discovering new fields of study (astronomy, math, physics, psychology, ...), and learning languages. The passion for language learning started in 2020 (summer) when I started listening to Russian music. And that's where I realized "Wait I can try learning this language! Oh freak this will be so cool!!". After 2 years that slowly transitioned into Japanese, which is what I'm still learning. My goal is to reach N2-N1 one day.
Here's a meme for you to keep that smile up!
![C meme to keep that smile up hehe](/images/memes/c_meme.png)
Contact: jerebicakevin@gmail.com <br>
YouTube: [@0xdeadbeer](https://youtube.com/@0xdeadbeer) <br>
Github: [@0xdeadbeer](https://github.com/0xdeadbeer)

View File

@ -1,17 +1,12 @@
---
title: "Resources"
date: 2023-04-14T20:46:19+02:00
tags: ["knowledge"]
---
Treat information with great care lol
情報をきれいに使って頂きありがとうございますw
---
## 0 Favorite English Youtubers
- [melodysheep](https://www.youtube.com/@melodysheep)
## English Youtubers
- [Melodysheep](https://www.youtube.com/@melodysheep)
- Please, really consider watching his content. It is pure gold. No questions asked.
- [Veritasium](https://www.youtube.com/@veritasium)
- [SomeOrdinaryGamers](https://www.youtube.com/@SomeOrdinaryGamers)
- [Computerphile](https://www.youtube.com/@Computerphile)
- [Numberphile](https://www.youtube.com/@numberphile)
@ -26,7 +21,7 @@ Treat information with great care lol
- [Ben Eater](https://www.youtube.com/@BenEater)
- [Andreas Kling](https://www.youtube.com/@awesomekling)
- [Linus Groh](https://www.youtube.com/@LinusGroh)
- [jdh](https://www.youtube.com/@jdh)
- [Jdh](https://www.youtube.com/@jdh)
- [CQURE Academy](https://www.youtube.com/@CQUREAcademy)
- [Seytonic](https://www.youtube.com/@Seytonic)
- [Write your own Operating System](https://www.youtube.com/@writeyourownoperatingsystem)
@ -34,10 +29,10 @@ Treat information with great care lol
- [Guided Hacking](https://www.youtube.com/@GuidedHacking)
- [TED](https://www.youtube.com/@TED)
## 1 Science
## Science
- [Feynman Lectures of Physics, Mathematics and Astronomy](https://www.feynmanlectures.caltech.edu/)
## 2 Favorite Japanese Youtubers
## Favorite Japanese Youtubers
- [日本語の森](https://www.youtube.com/@nihongonomori2013)
- [ヘルスカ](https://www.youtube.com/@Herusuka)
- [KUN ニート部](https://www.youtube.com/@kun_neet)
@ -45,75 +40,42 @@ Treat information with great care lol
- [That Japanese Man Yuta](https://www.youtube.com/@ThatJapaneseManYuta)
- [Dogen](https://www.youtube.com/@Dogen)
## 3 IT blogs
## IT blogs
- [OH SHINT! It's a blog](https://ohshint.gitbook.io/oh-shint-its-a-blog/)
- Blog full of OSINT resources.
- [Unix Sheikh](https://unixsheikh.com)
- Articles and tutorials about Open Source, BSD, GNU/Linux administration, pragmatic programming practices.
- The resources page is yet another gold mine of content.
- [Andy Sloane's blog](https://www.a1k0n.net/)
- Creator of the classy donut.c program 😎
- [Luke Smith](https://lukesmith.xyz/)
- Content creator of a lot of different kinds of tutorials regarding internet privacy, Linux, FOSS, and much more.
- Inspirational and realistic guy. (both highly positive traits in my opinion)
- [Marco Cetica](https://marcocetica.com/)
- Blog centered around programming, IT, hacking, etc.
- Found out about him through a Jails (BSD) article that he published on the website.
- Genuinely helpful and nice guy.
- [Eric's Random Writings](https://www.catb.org/esr/writings/)
- Blog centered around freedom and the Unix philosophy (can't have enough of these hehe)
- [Segmentation Fault](https://sgfault.com)
- **Author:** David Jimenez
- Blog centered around Linux and computers (in majority).
- [Electronics etc...](https://tomverbeure.github.io/)
- **Author:** Tom Verbeure
- Blog centered around electronics, their personal projects, new findings, etc.
- [Computers are bad](https://computer.rip/archive.html)
- **Author:** Jesse B. Crawford
- Its intent is to show you why, where, and how computers are bad and give you insights into each problem.
- Expect topics about computer history, computer security, and "constructive" technology criticism.
- [Robert Heaton](https://robertheaton.com/)
- **Author:** Robert Heaton
- Blog centered around their life, being a parent, teaching programming, online tracking & security, economics, writing, privacy, etc.
## 4 Old-Fashioned Internet
## Old-Fashioned Internet
- [Yarchive](https://yarchive.net/home.html)
- Large archive of Usenet's known articles regarding all sorts of topics
- [Wiby](https://wiby.me/)
- Simple search engine for non-commercial and old-fashioned websites.
- [Marginalia Search](https://search.marginalia.nu/)
- Simple search engine for non-commercial and old-fashioned websites.
- **Note:** Bigger index than Wiby's
## 5 Linux & Unix
## Linux & Unix
- [Linux Die Documentation](https://linux.die.net/)
- Read the docs!!
- [GNU Manuals](https://www.gnu.org/manual/manual.html)
- Manuals for GNU tools. Useful and worth keeping an eye on.
- [Linux Training](http://linux-training.be)
- Contains useful courses such as: System Administration, Linux Security, Linux Networking, etc.
- [MakeLinux](https://makelinux.net)
- Embedded Linux software development and Linux drivers
- [The Art of Unix Programming](http://catb.org/esr/writings/taoup/html/)
- Attempts to capture the engineering wisdom and philosophy of the Unix community as it's applied today.
- [CS4411 Operating Systems Course](https://www.csl.mtu.edu/cs4411.ck/www/)
- Principles of the design and implementation of operating systems.
- Topics include: process management, process scheduling, memory management, I/O, file systems.
- **⭐ Hint**: You can find other CS courses under the same domain using Google Dorks or some scraping of the web ;)
- [Elixir](https://elixir.bootlin.com/linux/latest/source)
- [Linux Kernel Teaching](https://linux-kernel-labs.github.io/refs/heads/master/)
- [Linux Insides](https://0xax.gitbooks.io/linux-insides/content/)
## 6 Research Paper Resources
## Research Paper Resources
- [ArXiv](https://arxiv.org)
- Open-access archive containing content and research papers that are centered around physics, mathematics, computer science, quantitive biology, quantitive finance, statistics, electrical engineering, systems science, and economics.
- [Papers we love](https://paperswelove.org)
- A community build around sharing academic computer science papers.
- [Two Minute Papers](https://www.youtube.com/@TwoMinutePapers)
- Youtube channel that showcases and attempts to explain interesting research works.
- **Run by:** Károly Zsolnai-Fehér
## 7 Psychology
## Psychology
- [Changing Minds](https://changingminds.org/)
- How we change what others think, believe, feel and do.
## 8 Talks
## Talks
- [Why comfort will ruin your life | Bill Eckstrom](https://www.youtube.com/watch?v=LBvHI1awWaI)
- [The most important lesson from 83,000 brain scans | Daniel Amen](https://www.youtube.com/watch?v=esPRsT-lmw8)

75
content/posts/books.md Normal file
View File

@ -0,0 +1,75 @@
---
title: "Books"
date: 2023-04-09T00:46:11+02:00
---
Everything started with walking, understanding what people around me were
saying, recognizing the dangers that are out there, learning cultures, to
eventually being broad to an institution that is supposed to teach me about
*life* - school. That is where I was forced to read. Everyday, non stop, till I
reached that deadline and had to write a summary of what I learned during that
period. "Is this what life is all about?" I asked myself. "So I will be forced
to read books and study topics that I have never seen being used in real life for
the next 9 years (minimum)?"
I have passed the first 9 grades studying my state, basic algebra, sociology,
basic law, making a small website, biology, etc. etc. Yet if I was to be tasked
with a minor issue in real life, I would find an excuse that would delay my action
or completely throw the problem out of my life altogether. How is it, that most
kids nowadays hate learning? The second they hear the word *math* their first
emotions are suffering, pain, and boredom.
We went from encouraging the contributions to humanity to making it seem like
it is the dullest activity someone could be doing to keep themselves busy. In my
opinion, we have created that by constructing a wrong educational system over
time and letting social media companies get away with selling their social
platforms to us. "What does social media have to do with learning?" you might
ask. Let me reply to that with "When iss the last time you were in the middle of
studying something very important, got frusturated at it, and decided to
distract yourself for a little while?"
The majority of us does that on a daily basis and we cannot deny the
uselessness of social media. No matter how much you try to hide it, you will know
that most of it does not provide any sort of value whatsoever and is just a
time killer engineered in a specific way to extrapolate as many minutes of your
attention as possible.
"Oh, but you can educate yourself through social media" - Ignoring sites like
Youtube, how in world do you think that those 200 characters that you can fit
into your post will give anyone a good understanding of any topic.
"Oh, but I need to talk to my friends" - Yup, ever heard of SMS before? Look, I
would totally understand.. if it was just ONE application. Why the fuck does
the majority have 4 platforms that all provide the same god damn service. Some
alternatives to SMS may include email, IRC, self-hosted chat server (if you
know what you are doing), matrix, etc.
Over the course of my teenagehood I realized how strongly this can impact one's
thinking abilities. In just a span of a year I turned my brain upside down and
had completely the opposite opinions from what I used to have before. How did
that happen though? Well, I deleted a good part of the social media I used to
use, I started investing more time in myself, I started talking and listening
to myself, I started seeing failure as the potential to grow rather than what I
was taught at school (failure = failed individual), and what I noticed in the
last 2 to 4 months was what I now call *The Deception of Everything*.
Biology, Sociology, Psychology, Mathematics, Physics!! They are all connected
with what I initially thought was the only field I would ever truly admire and
love! Computers! They are all interconnected subjects! A firing of neurons
finally made sense! What is so special about all of those subjects, and.. any
subject for that matter!! There will always be a reason people have invented it
and if I had to study it in school, there was probably a good reason. Because
it is all just connected and interesting! "No shit" you might think, but you
see, that is the problem. The fact that most of the people around me have not
realized it by now scares the shit out of me. Or at least.. that is how it
seems.
The mentioned event also occured in the most perfect timing it could have. As I
realized it, I was also in the middle of figuring out that books are way more
interesting than what I was taught at school. Here, I am not forced to learn
anything, I do not explore because I have to. I am doing it because it is so fun
it makes me start laughing by just thinking of it. I felt such an idiot to
finally realize how stupidy interesting it actually is I stayed there in my
dark room for 5 minutes laughing. And as I am now scrolling through the Amazon's
homepage of books, I cannot help myself but to smile everytime I see a book that
sparkles my interest.

43
content/posts/floppies.md Normal file
View File

@ -0,0 +1,43 @@
---
title: "Floppies"
date: 2024-04-25T21:21:30+02:00
---
![Floppy Reader](/images/floppies/pic1.jpg) Floppy reader positioned on my 2
year old custom-built PC. What an occurrence! The old meets the new hahah
A youngster like me could hardly appreciate the simplicity behind these things,
let alone the struggle elders had to go through to work with such technology. I
was searching for a male aux to male aux connector the other day and stumbled
on this reader with a stack of floppies nearby. The mounting process was
unsurprisingly easy since I am running Linux. I have no idea what is the case
with Windows, and franky, I do not care at this point in time. I rush to my
computer in all awe, excited to see what obscure and ancient data these might
have in them or how they even work. Most had MS DOS executables and Batch
installation scripts for some kind of software as well as some XLS tables and
other uninteresting data.
The mounting process had a peculiarity though.. I had to mount the whole disk
and not just a partition whose file-system has been recognized by the kernel
(`mount /dev/sda /mnt` instead of `mount /dev/sda1 /mnt`). Is that weird? I do
not know..
After minutes of staring at these boring files and finding nothing that would
suffice my interest.. I have decided to format one of the floppies with an ext4
file-system and make it my personal mini space. It is not like I can fit 4K
images in here, but a couple of text files will suffice.
![Interesting Floppies](/images/floppies/pic2.jpg) Here I collected all
diskettes with English shortnotes
An interesting feature of floppies is that you can forcibly restrict the
reader's head from writing to the disc by flicking a tiny switch on the bottom
right side of the plastic cover. Not all floppies have that switch though.
One thing I learned from researching floppies is their design mechanism. From
what I read, they work magnetically just like modern hard disks and beneath the
plastic is located the actual disc where the data is stored. When you insert
the floppy into the reader, it flicks the metal shield, exposing the internal
disc (black rectangle), attaches to it a read/write head and there it operates
according to the system's commands (reading/writing the data while the disc
spins around).

View File

@ -1,46 +1,91 @@
---
title: "Fun Spaced Repetition"
date: 2023-07-25T16:23:26+02:00
tags: ["sharing", "language learning", "knowledge"]
image: /images/the_right_time_to_learn.png
---
## Introduction
In this post I wanted to share some ideas about language learning gamification with my fellow internet readers. Why? because I think they're worth a thought or two. I believe they have the potential to improve the language learning field and make it more fun to learn languages (if done right). But honestly, not just the language learning field.. any field that can be studied through spaced repetition in an efficient manner.
In this post I wanted to share some ideas about language learning gamification
with my fellow internet readers. Why? because I think they are worth a thought
or two. I believe they have the potential to improve the language learning
field and make it more fun to learn languages (if done right). But honestly,
not just the language learning field.. any field that can be studied through
spaced repetition in an efficient manner.
My ideas revolve around an imaginary game that would implement spaced repetition in a fun and engaging/competitive way. The whole chain of thoughts about this started a year ago, when I wanted to build a fork of osu!lazer that would help you study japanese. I didn't think of integrating any spaced repetition at that time though. I merely tried to replace numbers of each circle with random japanese characters before giving up.
My ideas revolve around an imaginary game that would implement spaced
repetition in a fun and engaging/competitive way. The whole chain of thoughts
about this started a year ago, when I wanted to build a fork of osu!lazer that
would help you study japanese. I did not think of integrating any spaced
repetition at that time though. I merely tried to replace numbers of each
circle with random japanese characters before giving up.
But 1-2 months ago it struck me: "Why isn't there *still* a game for studying kanji/words?". Think about it, there's [all sorts of games for the two japanese alphabets](https://www.google.com/search?q=hiragana+katakana+game+&source=hp&ei=Bua_ZP_3Ec_kxc8P9JmWEA&iflsig=AD69kcEAAAAAZL_0Fhj46CgfzQMiCdzipSQwqpw1DRol&ved=0ahUKEwj_kpadkqqAAxVPcvEDHfSMBQIQ4dUDCAk&uact=5&oq=hiragana+katakana+game+&gs_lp=Egdnd3Mtd2l6IhdoaXJhZ2FuYSBrYXRha2FuYSBnYW1lIDIFEAAYgAQyBRAAGIAEMgYQABgWGB4yBhAAGBYYHjIGEAAYFhgeMgYQABgWGB4yCBAAGIoFGIYDMggQABiKBRiGAzIIEAAYigUYhgMyCBAAGIoFGIYDSNQYUABYnBhwAXgAkAEAmAHjAaABhRSqAQY4LjEzLjG4AQPIAQD4AQHCAgsQLhiABBjHARjRA8ICBRAuGIAEwgIIEC4YgAQY1ALCAg4QLhiABBjHARivARiYBcICBxAAGIAEGAo&sclient=gws-wiz) (katakana and hiragana). Both of them can be learned in a relatively short period of time. After you learn them you usually move to kanji or vocabulary building - the step that takes the longest (usually 3-6 years from what I've heard).
But 1-2 months ago it struck me: "Why is not there still a game for studying
kanji/words?". Think about it, there is [all sorts of games for the two japanese
alphabets](https://www.google.com/search?q=hiragana+katakana+game+&source=hp&ei=Bua_ZP_3Ec_kxc8P9JmWEA&iflsig=AD69kcEAAAAAZL_0Fhj46CgfzQMiCdzipSQwqpw1DRol&ved=0ahUKEwj_kpadkqqAAxVPcvEDHfSMBQIQ4dUDCAk&uact=5&oq=hiragana+katakana+game+&gs_lp=Egdnd3Mtd2l6IhdoaXJhZ2FuYSBrYXRha2FuYSBnYW1lIDIFEAAYgAQyBRAAGIAEMgYQABgWGB4yBhAAGBYYHjIGEAAYFhgeMgYQABgWGB4yCBAAGIoFGIYDMggQABiKBRiGAzIIEAAYigUYhgMyCBAAGIoFGIYDSNQYUABYnBhwAXgAkAEAmAHjAaABhRSqAQY4LjEzLjG4AQPIAQD4AQHCAgsQLhiABBjHARjRA8ICBRAuGIAEwgIIEC4YgAQY1ALCAg4QLhiABBjHARivARiYBcICBxAAGIAEGAo&sclient=gws-wiz)
(katakana and hiragana). Both of them can be learned in a relatively short
period of time. After you learn them you usually move to kanji or vocabulary
building - the step that takes the longest (usually 3-6 years from what I have
heard).
**So why is every developer focusing on those two alphabets, that represent a mere 2-3% of the whole learning material (excluding grammar, language immersion, etc.)?**
So why is every developer focusing on those two alphabets, that represent a
mere 2-3% of the whole learning material (excluding grammar, language
immersion, etc.)?
I say there should be more focus on the other 98% of the language - which is where the main problem lies.
I say there should be more focus on the other 98% of the language - which is
where the main problem lies.
## Now for the fun part
## Ideas
This is where the fun begins. It's time that we, as people, stand up and build something that will be fun and engaging.
This is where the fun begins. It is time that we, as people, stand up and build
something that will be fun and engaging.
It doesn't have to be osu! level addiction. It just has to be fun and keep the user coming back. Allow me to (finally) share some examples:
- Game similar to Space Invaders where vocabulary words are falling from the top of the player's screen. The player has to guess their meaning by typing the correct translation of the word, or picking a choice. If the correct choice is made, points are awarded. Else the player looses points.
- Multiplayer website where a group of friends can challenge each other by doing reviews of spaced repetition cards. When a player selects a choice correctly, they have the freedom to select the question card for the next person. Whoever fails gets disqualified. Essentially creating a fireball game.
- 2D multiplayer open world game where players get rewarded by doing small routines like arraging foreign vocabulary with translations, rephrasing sentences, etc.
- Uno (website) alternative where each card has a (spaced repetition) word attached to it. Essentially allowing players to match cards together by vocabulary as well.
- Chess (website) alternative that allows players to combine attacks from points that they earn by selecting correct translations of foreign words that popup during gameplay.
It does not have to be osu! level addiction. It just has to be fun and keep the
user coming back. Allow me to (finally) share some examples:
- Game similar to Space Invaders where vocabulary words are falling from the
top of the player's screen. The player has to guess their meaning by typing
the correct translation of the word, or picking a choice. If the correct
choice is made, points are awarded. Else the player looses points.
- Multiplayer website where a group of friends can challenge each other by
doing reviews of spaced repetition cards. When a player selects a choice
correctly, they have the freedom to select the question card for the next
person. Whoever fails gets disqualified. Essentially creating a fireball
game.
- 2D multiplayer open world game where players get rewarded by doing small
routines like arraging foreign vocabulary with translations, rephrasing
sentences, etc.
- Uno (website) alternative where each card has a (spaced repetition) word
attached to it. Essentially allowing players to match cards together by
vocabulary as well.
- Chess (website) alternative that allows players to combine attacks from
points that they earn by selecting correct translations of foreign words
that popup during gameplay.
- (Feeling inspired yet? [Hit me up!](mailto:jerebicakevin@gmail.com))
At this point, the only limit is truly the imagination.
## Time for development!
## Development
I'm honestly surprised at the fact that nobody has built something like this so far. There's of course [KanaInvaders](https://learnjapanesepod.com/kana-invaders/), which is where a good part of my inspiration comes from.. but as I've said earlier, we have to focus on the other 98%.
I am honestly surprised at the fact that nobody has built something like this so
far. There is of course
[KanaInvaders](https://learnjapanesepod.com/kana-invaders/), which is where a
good part of my inspiration comes from.. but as I have said earlier, we have to
focus on the other 98%.
I would be super glad to see more people open up to those ideas, team up, and create amazing open-source projects that will make learning so much more fun!
I would be super glad to see more people open up to those ideas, team up, and
create amazing open-source projects that will make learning so much more fun!
---
At the time of writing this post, I've started working on [MonR](https://github.com/0xdeadbeer/monr) (spaced repetition backend for games/apps), [MonW](https://github.com/0xdeadbeer/monw) (the first Unity example game that implements MonR), and some other projects that are yet to come on Github.
At the time of writing this post, I have started working on
[MonR](https://github.com/0xdeadbeer/monr) (spaced repetition backend for
games/apps), [MonW](https://github.com/0xdeadbeer/monw) (the first Unity
example game that implements MonR), and some other projects that are yet to
come on Github.
**At this point, any help is indispensable - because I'm afraid I'll not be able to keep it up alone. Therefore, if you want to contribute, and you know you have some will power within you, I say don't hesitate to spread the word, [hit me up](mailto:jerebicakevin@gmail.com), or do some 'passive' contributions directly on the mentioned repositories.**
At this point, any help is indispensable - because I am afraid I will not be
able to keep it up alone. Therefore, if you want to contribute, and you know
you have some will power within you, I say do not hesitate to spread the word,
[hit me up](mailto:jerebicakevin@gmail.com), or do some passive contributions
directly on the mentioned repositories.
Thank you. Cheers!🍺
Thank you. Cheers

View File

@ -1,21 +1,46 @@
---
title: "Becoming an absolute tech geek"
title: "Good Content"
date: 2023-04-08T00:33:53+02:00
tags: ["internet"]
image: /images/hacker.jpg
---
These days finding good content on the Internet is a real challenge. A lot of the times I find myself staring at the monitor wondering what I should search for, just to find that juicy content that goes into the detail of how something works, and also doesn't annoy me with all the bullshit ads, newsletters, and such.
These days finding good content on the internet is a real challenge. A lot of
the times I find myself staring at the monitor wondering what I should search
for, just to find that juicy content that goes into the detail of how something
works, and also does not annoy me with advertisements, newsletters, and the
like.
The original idea for the Internet was really simple, a place for folks to share, store, and find information. It was no more than static websites serving HTML and CSS. Now that we have big tech tracking us on practically every corner of the Internet, it's really difficult to find a *clean* resource you could say. Search algorithms prefer clicks, revenue, ADs, and beauty over simplistic but gold content.
The original idea for the internet was really simple, a place for folks to
share, store, and find information. It was no more than static websites serving
HTML and CSS. Now that we have big tech tracking us on practically every corner
of the Internet, it is really difficult to find a clean resource you could say.
Search algorithms prefer clicks, revenue, advertisements, and beauty over
simplistic but gold content.
If you're a fellow searching for structured content and want answers RIGHT NOW rather than in the next 10 minutes, here's what you have to know. Unless you're a person with serious brain issues, the following applies to you. Your brain is made to be flexible, to adapt to new environments whether they are filled with *Netflix & Chill, reading books, doing fun activities, interacting with people, or anything else*. And your brain may well have a favorite learning style, but that doesn't mean that you should limit yourself to just that learning style. In fact, you have to challenge your brain to step out of its comfort zone and learn, think, adapt, and consider. **That's why I think learning styles are nothing more than temporary classification of how your brain is preferenced to devour information from the outside world.**
If you are a fellow searching for structured content and want answers RIGHT NOW
rather than in the next 10 minutes, here is what you have to know. Unless you
are a person with serious mental diseases, the following applies to you. Your
brain is made to be flexible, to adapt to new environments. Whether they are
filled with Netflix & Chill, reading books, doing fun activities, interacting
with people, or anything else. And your brain may well have a favorite learning
style, but that does not mean that you should limit yourself to just that
learning style. In fact, you have to challenge your brain to step out of its
comfort zone and learn, think, adapt, and consider. This is why I think
learning styles are nothing more than temporary classification of how your
brain is preferenced to devour information from the outside world.
I only realized this after coming into I.T., at the beginning I thought that learning was going to be as simple as a watch & learn process. Well, after 5 years of being into I.T., I can safely say that I was wrong. Most learning requires the will to read, explore, dig deeper, and most importantly.. experiment!
I only realized this after coming into IT, at the beginning I thought that
learning was going to be as simple as a watch & learn process. Well, after 5
years of being into IT, I can safely say that I was wrong. Most learning
requires the will to read, explore, dig deeper, and most importantly..
experiment!
If this seems new to you, or even strange, know that it will show up sooner or later in your career and the sooner you start experimenting, the easier and more fun it will be! So why not start today? Get yourself a damn book, go read some research papers online, share, learn, adapt, wonder, and grow! :)
If this seems new to you, or even strange, know that it will show up sooner or
later in your career and the sooner you start experimenting, the easier and
more fun it will be! So why not start today? Get yourself a damn book, go read
some research papers online, share, learn, adapt, wonder, and grow.
I'll be leaving you with some good resources that I accumulated over the last year.
I wll be leaving you with some good resources that I accumulated over the last
year.
- [Marginalia Search](https://search.marginalia.nu/)
- [Neocities](https://neocities.org/browse)
- [SearX](https://searx.thegpm.org/)
@ -24,4 +49,4 @@ I'll be leaving you with some good resources that I accumulated over the last ye
- [Linux Documentation](https://linux.die.net/)
- [GNU Manuals](https://www.gnu.org/manual/manual.en.html)
**Note:** will make a resources page eventually.
More resources are available in the resources page.

View File

@ -0,0 +1,111 @@
---
title: "Information Scarcity"
date: 2024-03-01T21:55:39+01:00
---
I will not be picking battles between the extreme right or left side of the
political spectrum. In fact, I will merely try to report on the negative
impacts that capitalism has had on this astounding technology, referred to as
"the internet". I will also try to stay away from emotional writing, even if
such a technology lies very close to my heart. This does not mean I side with
left nor right. This means the common individual should focus more on the
problem at hand and come up with the best possible solution for that specific
scenario rather than just falling onto the extreme left or right wing.
This is especially true for developers..
We live in a world where money is power. That fact should not be ignored. The
creation of internet was an unexpected turn for the market. Companies realized
that it was a powerful tool to gain new customers with. And of course, how
could it not be? You are more exposed to the new customers' eyes and are
therefore, more likely to make more sales and profit, right? How could have
that possibly turned for the worse?
## Data Protection
The internet that we live in today is a mess. Service creation -> data
collection -> data breach. In that order. Service creation refers to any act of
writing or shipping software for the end-user (or the end-developer depending
on what you are creating). Data collection refers to the collection of
personally identifiable information without explicit or full consent from the
user (which, let's be real, is the case in 2024. Well, unless you are keen on
reading the 2000 word long privacy policy for every product that you use, which
can be changed by the company at any time of the day. Without your consent.
Have fun reading these vague essays). Data breach refers to the unescapable
information compromise that will happen sooner or later in the process of
shipping software to a wider audience. Production code is never 100% safe and
free from security vulnerabilities. Therefore, every time a maliscious user
discovers an unknown vulnerability, a potential data breach is about to take
place. The possible outcomes range from absolutely nothing to the total data
compromise for the users.
Sometimes I find myself questioning the intelect of the people who create
solutions to simple problems, yet feel this internal need to surround the
solution with software rubbish. Perhaps you have noticed that many websites
nowadays require account creation with a personally identifiable email address,
phone number, gender, address, and much more. Most of such websites deal with
problems whose core solution is SIMPLIFICATION, yet they go the other way
around, endlessly complicating their systems over and over again until they
break. And as you might imagine, the more code a product has, the more
vulnerable it is to security vulnerabilities. That is the number one lesson
every developer should be aware of before starting out on their problem solving
journey.
Not to mention the pace at which the developers are forced to work. Data
protection is most definitely not the top priority for a company as much as the
process for profiting is. Developers are constantly pounded and pounded to
create software as quickly as possible. Limiting them with impossibly short
deadlines and stressing them out. This most definitely leads to security bugs.
## Rise for the Money
Do we really wish for such use of such a powerful technology? A technology that
has the potential to transmit GIGABYTES of information every second, yet is
limited by the SOS (shiny object syndrome) of humans and their will to make
money by wasting processing power on advertisements, distract the end-users
with useless popups, make them fill forms, and create accounts to spam them
with new deals and make even more money? All of that while also collecting in
bulk all sorts of personally identifiable information? Just to give them the
content that they needed to inform themselves? Just to accomplish the one basic
idea that internet, this stunning technology, promised to bring to the table
since it ever came to existence? How did that happen? How did usage of such a
technology further push drawbacks against it?
The approach that the first internet took, was by far the best at fulfilling
what we define as "internet" - a place for people to find and share
information, not necessarily limited by race, background, actions, political
standpoint, or any other form of bias. Before the companies realized the
potential of this technology and invaded it with bloat, internet was a place
for individuals to share information, get to know other people, and create
something personal. Something private. Something that was a digital footprint
of the community. That footprint represented people and their will to
collaborate and share information.
However, as companies and governments got more involved, they started throwing
more and more capitalistic structures into it, which resulted in a slow death
of the initial goal and reason behind this technology.
This can be widely shown from the fact, that blogs, BLOGS, a once subjective
and private online expression of somebody's persona or presence, are now
spitting blood to be the top tier result on Google's search page. That
evidently puts money and power before community, collaboration, and especially,
*content quality*. Which is quite self-evident after you notice the vagueness
that most articles have online. The page fills you with popups, advertisements,
forms to fill, and required login pages, just to access content that is
precooked by artificial intelligence, is extremely vague, and potentially
misleading. Yes, it is indeed, a triumph for information scarcity that is
taking place on one of the biggest highways of information we currently
possess. And it does indeed, show one of many negative traits of capitalism
after you throw it into a free cyber space.
## Clapback
Formerly, to escape this hellish use of the internet, you had to stop using the
internet. Now, there is a new world that digital rights activists and freedom
seekers are creating. It is a strong and willingful movement that has been
standing its ground for many decades. It was in September 1983 that Richard
Stallman launched the GNU project, whose goal was to create a fully functioning
operating system and a toolset to work with data on that system. Today, a
combination of the GNU project and Linux kernel (the core of an operating
system) is known as GNU/Linux and it is a perfect alternative to the
proprietary systems like OS X or MS Windows that we do not deserve nor need.

View File

@ -1,26 +0,0 @@
---
title: "It's All About Books"
date: 2023-04-09T00:46:11+02:00
tags: ["knowledge"]
image: /images/library.png
---
Everything started with walking, understanding what people around me were saying, recognizing the dangers that are out there, learning cultures, to eventually being broad to an institution that's supposed to teach me about *life* - school. That's where I was forced to read. Everyday, non stop, till I reached that deadline and had to write a summary of what I learned during that period. "Is this what life is all about?" I asked myself. "So I will be forced to read books and study topics that I've never seen being used in real life for the next 9 years (minimum)?"
---
I've passed the first 9 grades studying my state, basic algebra, sociology, basic law, making a small website, biology, etc. etc. Yet if I was to be tasked with a minor issue in real life, I'd find an excuse that would delay my action or completely throw the problem out of my life altogether. How is it, that most kids nowadays hate learning? The second they hear the word *math* their first emotions are suffering, pain, and boredom.
We went from encouraging the contributions to humanity to making it seem like it's the dullest activity someone could be doing to keep themselves busy. In my opinion, we've created that by constructing a wrong educational system over time and letting social media companies get away with selling their social platforms to us. "What does social media have to do with learning?" you might ask. Let me reply to that with "When's the last time you were in the middle of studying something very important, got frusturated at it, and decided to distract yourself for a little while?"
The majority of us does that on a daily basis and we cannot deny the uselessness of social media. No matter how much you try to hide it, you'll know that most of it does not provide any sort of value whatsoever and is just a time killer engineered in a specific way to extrapolate as many minutes of your attention as possible.
"Oh, but you can educate yourself through social media" - Ignoring sites like Youtube, how in world do you think that those 200 characters that you can fit into your post will give anyone a good understanding of any topic.
"Oh, but I need to talk to my friends" - Yup, ever heard of SMS before? Look, I would totally understand.. if it was just ONE application. Why the fuck does the majority have 4 platforms that all provide the same god damn service. Some alternatives to SMS may include email, IRC, self-hosted chat server (if you know what you're doing), matrix, etc.
Over the course of my teenagehood I realized how strongly this can impact one's thinking abilities. In just a span of a year I turned my brain upside down and had completely the opposite opinions from what I used to have before. How did that happen though? Well, I deleted a good part of the social media I used to use, I started investing more time in myself, I started talking and listening to myself, I started seeing failure as the potential to grow rather than what I was taught at school (failure = failed individual), and what I noticed in the last 2 to 4 months was what I now call *The Deception of Everything*.
Biology, Sociology, Psychology, Mathematics, Physics!! They are all connected with what I initially thought was the only field I'd ever truly admire and love! Computers! They are all interconnected subjects! A firing of neurons finally made sense! What's so special about all of those subjects, and.. any subject for that matter!! There'll always be a reason people have invented it and if I had to study it in school, there was probably a good reason. Because it's all just connected and interesting! "No shit" you might think, but you see, that's the problem. The fact that most of the people around me have not realized it by now scares the shit out of me. Or at least.. that's how it seems.
The mentioned event also occured in the most perfect timing it could have. As I realized it, I was also in the middle of figuring out that books are way more interesting than what I was taught at school. Here, I'm not forced to learn anything, I don't explore because I have to. I'm doing it because it's so fun it makes me start laughing by just thinking of it. I felt such an idiot to finally realize how stupidy interesting it actually is I stayed there in my dark room for 5 minutes laughing. And as I'm now scrolling through the Amazon's homepage of books, I can't help myself but to smile everytime I see a book that sparkles my interest. And so should you, dear reader :)

View File

@ -1,34 +1,42 @@
---
title: "Black Clover & Japanese Language Immersion"
date: 2023-08-15T16:49:55+02:00
tags: ["japanese", "language_learning", "sharing", "knowledge"]
---
Today I wanted to share my language learning experience of Black Clover. If you're a fellow learner of the Japanese language and would like to hear some feedback on this anime, this is the post for you.
Today I wanted to share my language learning experience of Black Clover. If
you are a fellow learner of the Japanese language and would like to hear some
feedback on this anime, this is the post for you.
I should point out that this is my first anime I ever fully watched with Japanese subtitles. And so, big thanks to [Asbplayer](https://github.com/killergerbah/asbplayer) and [Yomichan](https://foosoft.net/projects/yomichan/) for making this possible. Splendid tools for sentence mining.
I should point out that this is my first anime I ever fully watched with
Japanese subtitles. And so, big thanks to
[Asbplayer](https://github.com/killergerbah/asbplayer) and
[Yomichan](https://foosoft.net/projects/yomichan/) for making this possible.
Splendid tools for sentence mining.
If you don't know what they are, in short:
- Yomichan is an extension which allows you to highlight Japanese words and show you their dictionary translations (alongside also provides amazing shortcuts for adding the word directly into Anki).
- Asbplayer is an extension which allows you to insert custom subtitle files into a webplayer (also provides handy shortcuts for automatically inserting audio/screenshots into Anki cards)
If you do not know what they are, in short:
- Yomichan is an extension which allows you to highlight Japanese words and
show you their dictionary translations (alongside also provides amazing
shortcuts for adding the word directly into Anki).
- Asbplayer is an extension which allows you to insert custom subtitle files
into a webplayer (also provides handy shortcuts for automatically inserting
audio/screenshots into Anki cards)
Not only was watching anime with subtitles suddenly much easier, I could finally do real sentence mining with Anki and extract all the new words I wanted with the shortcuts that the two extensions provided.
Not only was watching anime with subtitles suddenly much easier, I could
finally do real sentence mining with Anki and extract all the new words I
wanted with the shortcuts that the two extensions provided.
![Asbplayer + Yomichan are based](/images/asbplayer_yomi.png)
The whole experience was super fun and engaging enough to make me say "oh come on, one more episode. \*click\*" (this is especially true because at some point I even started getting the jokes)
The whole experience was super fun and engaging enough to make me say "oh come
on, one more episode. \*click\*" (this is especially true because at some point
I even started getting the jokes)
With all this said, it's totally possible that not everybody will enjoy the anime the same way as I did. Given the preferences, knowledge difference, etc. that we might have. But overall I recommend this anime to anybody who feels that they're at least N4 or better.
With all this said, it is totally possible that not everybody will enjoy the
anime the same way as I did. Given the preferences, knowledge difference, etc.
that we might have. But overall I recommend this anime to anybody who feels
that they are at least N4 or better.
Now, what did I get from this anime?
- Roughly 200-300 new words
- Listening and reading skills improved a lot
- Fun
---
One step closer to N1 boys. One day one day.
![\*Bro fist\*](/images/fist.gif)
Wish you a great day, cheers!

View File

@ -1,18 +1,48 @@
---
title: "Joyfulness With Language Immersion"
date: 2023-05-28T12:59:12+02:00
tags: ["language learning", "japanese", "self-improvement"]
image: /images/japanese-media.png
---
In this post I'd like to talk about one of the most (in my opinion) joyful moments you'll ever get when doing language immersion.
In this post I would like to talk about one of the most (in my opinion) joyful
moments you will ever get when doing language immersion.
What exactly inspired me to write this is the fact that I myself have experienced this 1 day before writing this article. For context, I've been trying to get a torrent set up on one of my VMs on which I usually host things temporarily, and decided to listen to some japanese music in the background since I knew that this was gonna be a long process.
What exactly inspired me to write this is the fact that I myself have
experienced this 1 day before writing this article. For context, I have been
trying to get a torrent set up on one of my VMs on which I usually host things
temporarily, and decided to listen to some japanese music in the background
since I knew that this was gonna be a long process.
Most of those songs were songs that I haven't listened to in well over a year and completely forgot about them. But these songs (like any other song) had specific emotions and memories attached to them and relistening them not only proved to give me a big hit of nostalgia and flashbacks, but the fact that I was able to comprehend most of them was so amazing I couldn't believe what I was listening to ([Blue Encount from 僕のヒーローアカデミア](https://www.youtube.com/watch?v=VtNgeDxYJzE) being by far the best example of what I couldn't understand a year ago).
Most of those songs were songs that I have not listened to in well over a year
and completely forgot about them. But these songs (like any other song) had
specific emotions and memories attached to them and relistening them not only
proved to give me a big hit of nostalgia and flashbacks, but the fact that I
was able to comprehend most of them was so amazing I could not believe what I
was listening to ([Blue Encount from
僕のヒーローアカデミア](https://www.youtube.com/watch?v=VtNgeDxYJzE) being by
far the best example of what I could not understand a year ago).
For a second it seemed like I unlocked a new area of the song that was once hidden to me and completely out of discussion. What I was once listening to and "letting it go by, without thinking about it's meaning" as to say, was now being automatically converted in my brain. And this is the experience I'm talking about. The only sign of improvement I ever get is this. And I'm so thankful that I get it from time to time because it really keeps me going like nothing else.
For a second it seemed like I unlocked a new area of the song that was once
hidden to me and completely out of discussion. What I was once listening to and
"letting it go by, without thinking about it is meaning" as to say, was now
being automatically converted in my brain. And this is the experience I am
talking about. The only sign of improvement I ever get is this. And I am so
thankful that I get it from time to time because it really keeps me going like
nothing else.
"Oh," you might say, "but surely you can see your progress and advancement over time as you start to notice that you understand more and more of the content that you absorb." Well, that's actually quite false, in my opinion. As you advance in a language and learn new words day after day, the relative difference between what you knew 5 days ago and what you know now are so slim that you practically can't see it. At the beginning though, those differences are quite large. As Tom Scott put it, ["Going from 201 to 202 feels like a tiny change, but going from 1 to 2 is a doubling."](https://www.youtube.com/watch?v=h9j89L8eQQk&t=208s) Although the topic of that video was not language learning, I honestly feel like it applies to language learning as well. That's why I get so happy and motivated when this occurence happens. It tells me that whatever I knew about Japanese last year is completely different to what I know now. Knowing that you're making progress is way better than having the idea that you're stuck in one place for the whole time in my opinion.
"Oh," you might say, "but surely you can see your progress and advancement over
time as you start to notice that you understand more and more of the content
that you absorb." Well, that is actually quite false, in my opinion. As you
advance in a language and learn new words day after day, the relative
difference between what you knew 5 days ago and what you know now are so slim
that you practically cannot see it. At the beginning though, those differences
are quite large. As Tom Scott put it, ["Going from 201 to 202 feels like a tiny
change, but going from 1 to 2 is a
doubling."](https://www.youtube.com/watch?v=h9j89L8eQQk&t=208s) Although the
topic of that video was not language learning, I honestly feel like it applies
to language learning as well. That is why I get so happy and motivated when
this occurence happens. It tells me that whatever I knew about Japanese last
year is completely different to what I know now. Knowing that you are making
progress is way better than having the idea that you are stuck in one place for
the whole time in my opinion.
Thanks for reading this.

View File

@ -1,39 +1,55 @@
---
title: "TLPI: Linux Signals"
date: 2023-04-29T16:21:24+02:00
tags: ["linux", "linux-programming-interface"]
image: /images/TLPI.png
---
## 0 Introduction
I've started reading The Linux Programming Interface! And throughout the book I'll be writing some cool articles regarding new things I learned. The book is being read in no particular order, so expect the articles to follow that non-orderness (if that's even a word). In this article specifically, however, I'll be writing about signals. What are signals? How do they work? How to implement them inside my own program? and much more.
I have started reading The Linux Programming Interface! And throughout the book
I will be writing some cool articles regarding new things I learned. The book
is being read in no particular order, so expect the articles to follow that
non-orderness (if that is even a word). In this article specifically, however,
I will be writing about signals. What are signals? How do they work? How to
implement them inside my own program? and much more.
> **Note**: If you want to follow along, this article is based on the 20th chapter of the book (Signals: Fundamental Concepts). I may add my own tips and lessons from time to time though.
---
> Note: If you want to follow along, this article is based on the 20th chapter
> of the book (Signals: Fundamental Concepts). I may add my own tips and
> lessons from time to time though.
## 1 Signals
In short, signals are software interrupts. During the program's execution, if the program receives a signal, it will stop the program's execution and finish some new and more important job. That job can depend on which signal was fired and what the program is set to do after receiving *that* specific signal.
In short, signals are software interrupts. During the program's execution, if
the program receives a signal, it will stop the program's execution and finish
some new and more important job. That job can depend on which signal was fired
and what the program is set to do after receiving that specific signal.
"Ok, in what context is that useful?" you might ask. Well, a simple example might be killing a program through the shell. If you've worked with Linux for long enough, you might know that pressing CTRL+C kills any currently pending program that was executed from the shell. All the shell is really doing is waiting for keyboard input, and sending a specific kill signal to the program.
"Ok, in what context is that useful?" you might ask. Well, a simple example
might be killing a program through the shell. If you have worked with Linux for
long enough, you might know that pressing CTRL+C kills any currently pending
program that was executed from the shell. All the shell is really doing is
waiting for keyboard input, and sending a specific kill signal to the program.
There's more signals than just the kill signal though (i.e. SIGINT or SIGKILL in many cases)
There is more signals than just the kill signal though (i.e. SIGINT or SIGKILL
in many cases)
Usually, every signal has it's own default action that should be taken after the program receives it. But guess what, we can change it! **That is called Signal Disposition.** And we can change it to: ```*func(int)``` ```SIG_IGN``` or ```SIG_DFL```
Usually, every signal has it is own default action that should be taken after
the program receives it. But guess what, we can change it! That is called
Signal Disposition. And we can change it to: ```func(int)``` ```SIG_IGN``` or
```SIG_DFL```
- ```*func(int)```: could be a custom function that we want to execute when the signal is received.
- ```func(int)```: could be a custom function that we want to execute when the
signal is received.
- ```SIG_IGN```: just ignore the signal (i.e. no action for a specific signal)
- ```SIG_DFL```: execute default action of the signal (whatever it may be)
And we can do so, using either:
void (signal(int sig, void (*func)(int)))(int);
void (signal(int sig, void (func)(int)))(int);
or a more flexible/complex alternative:
int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact);
int sigaction(int sig, const struct sigaction act, struct sigaction
oldact);
both of which are defined in ```<signal.h>```
@ -41,43 +57,64 @@ both of which are defined in ```<signal.h>```
Signals can be sent using the following function.
int kill(pid_t pid, int sig); // send signal to a process
int killpg(int pgrp, int sig); // send signal to a process group
int kill(pid_t pid, int sig); // send signal to a process int killpg(int
pgrp, int sig); // send signal to a process group
Or an alternative (in case you want to send the signal to the same program)
int raise(int sig); // literally the same as the line below
kill(getpid(), sig);
int raise(int sig); // literally the same as the line below kill(getpid(),
sig);
You might be already familiar with the program ```kill``` from the command line. And in case you're wondering.. well, yeah, they serve practically the same purpose.
You might be already familiar with the program ```kill``` from the command
line. And in case you are wondering.. well, yeah, they serve practically the
same purpose.
> **Note**: Just because they're named *kill*, it does not mean that they specifically have to kill a process. It's just called that way because originally you could in fact, only kill processes. But now you can send various signals with it (and also check if a PID is in use - more on that later).
> Note: Just because they are named kill, it does not mean that they
> specifically have to kill a process. It is just called that way because
> originally you could in fact, only kill processes. But now you can send
> various signals with it (and also check if a PID is in use - more on that
> later).
## 3 Signal mask
What if we want to block a signal? Or just temporarily let the program know that we don't want to accept certain types of signals? In that case we use something called a Signal Mask.
What if we want to block a signal? Or just temporarily let the program know
that we do not want to accept certain types of signals? In that case we use
something called a Signal Mask.
You can use the following function to change/edit the process signal mask.
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
int sigprocmask(int how, const sigset_t set, sigset_t oldset);
> **Note**: ```sigset_t``` is a type of data structure that can contain all types of signals. Imagine it more like a dictionary than a Queue or array where you can find multiple elements of the same signal type.
> Note: ```sigset_t``` is a type of data structure that can contain all types
> of signals. Imagine it more like a dictionary than a Queue or array where you
> can find multiple elements of the same signal type.
> **Hint**: More information can be found [here](https://www.gnu.org/software/libc/manual/html_node/Process-Signal-Mask.html)
> Hint: More information can be found
> [here](https://www.gnu.org/software/libc/manual/html_node/Process-Signal-Mask.html)
If a signal of a specific type is being sent to a process which blocked that type, it will be marked as pending and will be delivered once the signal mask unblocks it (if ever).
If a signal of a specific type is being sent to a process which blocked that
type, it will be marked as pending and will be delivered once the signal mask
unblocks it (if ever).
If you want to view all the currently pending signals you can do so, using the following function.
If you want to view all the currently pending signals you can do so, using the
following function.
int sigpending (sigset_t *set);
int sigpending (sigset_t set);
> **Note**: Yes, it does return a signal set, and so no matter how many pending signals of a blocked type you'll send, they'll still be counted as one and sent only once after they're unblocked. As I've said, this is not a queue, but more like a dictionary.. or.. queue where duplicates do not exist.
> Note: Yes, it does return a signal set, and so no matter how many pending
> signals of a blocked type you will send, they will still be counted as one
> and sent only once after they are unblocked. As I have said, this is not a
> queue, but more like a dictionary.. or.. queue where duplicates do not exist.
## 4 Pause
If you want to suspend the execution of the program and wait for signals, you can do so using the following function
If you want to suspend the execution of the program and wait for signals, you
can do so using the following function
int pause(void);
> **Note**: from what the book said, yes, it is more optimal to use pause than to use a loop. Although I didn't verify this in practice, I'm giving it the benefit of the doubt. You can verify it yourself if you care that much about program timings.
> Note: from what the book said, yes, it is more optimal to use pause than to
> use a loop. Although I did not verify this in practice, I am giving it the
> benefit of the doubt. You can verify it yourself if you care that much about
> program timings.

View File

@ -0,0 +1,36 @@
---
title: "OpenSSL Notes and Resources"
date: 2024-02-24T17:35:10+01:00
---
- Note: This article will get updates over time as I continue on reading the source code of the OpenSSL project.
- Note: These notes mainly cover the latest version at the time of updating this article. Currently, I am reading: v3.2.1
- Note: Notes are provided at my will and convenience. Keep in mind that it takes time for me to take notes and write articles. If you desire an even deeper understanding of the project, you are welcome to read the [source code](https://github.com/openssl/openssl), and if you can, [contributing to this article](https://github.com/0xdeadbeer/blog) would be greatly appreciated.
### Common structs
These are the most common structs you will come accross when reading the source code.
- `SSL_CTX`: context for a program. Can be created using `SSL_CTX_new(3)`
- `SSL` (SSL_CONNECTION) represents a SSL connection (and is created under a context)
- `SSL_METHOD`: struct with function pointers that a context inherits and can use when it has to perform an SSL action (connect, read, peek, write, ctrl, etc.)
- `SSL_SESSION`:
- `SSL_CIPHER`:
---
- `TLS_client_method`: a SSL_METHOD with client utility function pointers
- `TLS_server_method`: a SSL_METHOD with server utility function pointers
---
- `BIO`: struct that can be used to handle program I/O. There are two types of BIOs, source/sink and filter. A BIO can represent an open file, a network socket, a memory buffer, etc. [[1]](https://www.openssl.org/docs/man1.1.1/man7/bio.html) [[2]](https://stackoverflow.com/a/51672134)
- `BIO_METHOD`: struct with function pointers that a BIO inherits and can use when it has to perform an I/O action (bwrite, bread, bputs, bgets, crtl, etc.)
---
## Resources
- [Matt Caswell on OpenSSL and Cryptography](https://www.youtube.com/watch?v=RNqlpA1qH64)
- [RFC: The Transport Layer Security (TLS) Protocol Version 1.2](https://datatracker.ietf.org/doc/html/rfc5246)
- [RFC: The Transport Layer Security (TLS) Protocol Version 1.3](https://datatracker.ietf.org/doc/html/rfc8446)
- [RFC: Transport Layer Security (TLS) Extensions: Extension Definitions](https://datatracker.ietf.org/doc/html/rfc6066)

View File

@ -1,42 +1,70 @@
---
title: "Outfucking All Cloud"
date: 2023-04-17T18:29:38+02:00
tags: ["internet", "internet security", "privacy"]
image: /images/memes/fuck_cloud.png
---
## 0 Introduction
## Introduction
Lately, I've been facing a serious issue with my backup system. The problem was the following. I usually keep backups scattered across all of my disks in order to fulfill some basic availability rule.
However, the problem arises when you notice that all of those disks are always connected to my computer, which does not have any lightning protection. And since I've been getting quite cautious about my spendings, I'd rather avoid buying a surge protector of some sort.
And so, in case of a lightning strike, all of those backups will be gone. Parts of the computer included. Therefore, the most elegant solution to this problem? Rclone!
Lately, I have been facing a serious issue with my backup system. The problem
was the following. I usually keep backups scattered across all of my disks in
order to fulfill some basic availability rule. However, the problem arises when
you notice that all of those disks are always connected to my computer, which
does not have any lightning protection. And since I have been getting quite
cautious about my spendings, I would rather avoid buying a surge protector of some
sort. And so, in case of a lightning strike, all of those backups will be gone.
Parts of the computer included. Therefore, the most elegant solution to this
problem? Rclone!
---
## Outcome
## 1 Outcome
Let me explain my solution. If you read my [Secure Linux
Setup](/posts/secure-linux-setup/) article, you may have noticed I have a
strong will to protect my data. And so, you might expect me to be all against
cloud. And to be fair, I surely am. That is, when I serve them raw data heheee
Let me explain my solution. If you read my [Secure Linux Setup](/posts/secure-linux-setup/) article, you may have noticed I have a strong will to protect my data. And so, you might expect me to be all against cloud. And to be fair, I surely am. That is, **when I serve them raw data heheee**
Problem is, I cannot afford a server at the moment. And cloud really seems like
the only option to choose for high availability. Therefore, I did exactly what
you would expect from a Linux security-conscious person o.o
Problem is, I cannot afford a server at the moment. And cloud really seems like the only option to choose for high availability. Therefore, I did exactly what you would expect from a Linux security-conscious person o.o
Take my files, zip them, encrypt those fellas like no tomorrow, and finally
send them over to the big tech.
Take my files, zip them, **encrypt those fellas like no tomorrow**, and finally send them over to the big tech.
That is right, I am encrypting all my data before sending it online. Crazy right?
Who would have thought? No but for real, I do not know why I did not start doing it
before. For the ones that want even more security over their data, you may as
well just encrypt it multiple times with different keys before sending it
online.
That's right, I'm encrypting all my data before sending it online. Crazy right? Who would've thought? No but for real, I don't know why I didn't start doing it before. For the ones that want even more security over their data, you may as well just encrypt it multiple times with different keys before sending it online.
## /bin/bash
## 2 Taking it to the /bin/bash level
A couple of months ago I saw somebody mention it inside one of the Linux
servers that I am in. I did not give it too much thought at that time, I thought
that local backups were all I needed to stay safe. But after realizing the
problem (two weeks ago), I started digging into the tool and realized how cool
it actually is. All I had to do was create a project inside the Google API
console, create a basic consent screen, generate a client ID & secret, and
BOOM! The dopamine hit I was looking for!
A couple of months ago I saw somebody mention it inside one of the Linux servers that I'm in. I didn't give it too much thought at that time, I thought that local backups were all I needed to stay safe.
But after realizing the problem (two weeks ago), I started digging into the tool and realized how cool it actually is. All I had to do was create a project inside the Google API console, create a basic consent screen, generate a client ID & secret, and BOOM! The dopamine hit I was looking for!
I was able to mount my Google Drive as a "disk" onto my Linux filesystem. That
inspired me to create another backup script, which would serve the cloud with
my encrypted data multiple times a day.
I was able to mount my Google Drive as a "disk" onto my Linux filesystem. That inspired me to create another backup script, which would serve the cloud with my encrypted data multiple times a day.
I am not joking when I say that this tool is fucking awesome! Just look at what
it takes to mount my Google Drive to /mnt: ```rclone mount main_gdrive: /mnt```
I'm not joking when I say that this tool is fucking awesome! Just look at what it takes to mount my Google Drive to /mnt:
```rclone mount main_gdrive: /mnt```
For the curious individuals, [this](https://rclone.org/drive/) is the guide I
followed, and this is my new [backup
script](https://gist.github.com/0xdeadbeer/be247747968840f3748ffa7a60d0f0be)
For the curious individuals, [this](https://rclone.org/drive/) is the guide I followed, and this is my new [backup script](https://gist.github.com/0xdeadbeer/be247747968840f3748ffa7a60d0f0be)
> Hint: It is recommended to encrypt your Rclone config
> (```~/.config/rclone/rclone.conf```) also. Fortunately, that functionality is
> already provided by Rclone whenever you use it so you do not have to
> encrypt/decrypt it on your own. On the other hand, you may choose to do so to
> have more control over what algorithm to use when encrypting the config. But
> for more security, please encrypt your configs, since they usually hold all
> sorts of sensitive information (especially in Rclone's case)...
> **💡Hint:** It's recommended to encrypt your Rclone config (```~/.config/rclone/rclone.conf```) also. Fortunately, that functionality is already provided by Rclone whenever you use it so you don't have to encrypt/decrypt it on your own. On the other hand, you may choose to do so to have more control over what algorithm to use when encrypting the config. But for more security, please encrypt your configs, since they usually hold all sorts of sensitive information (especially in Rclone's case)...
> **Note:** It's very possible that I'll be forced to change my backup scripts because of obvious privacy reasons. But I hope you get the idea.
> Note: It is likely that I will be forced to change my backup scripts
> because of obvious privacy reasons. But I hope you get the idea.

View File

@ -1,20 +1,32 @@
---
title: "Reflections Are Fun"
date: 2023-04-21T17:50:05+02:00
tags: ["osint", "privacy"]
image: /images/reflections.jpg
---
Honestly, I have no idea if I'm going to come off as a creep by posing this, but I think that reflections are ~~fun~~ scary!
Honestly, I have no idea if I am going to come off as a creep by posing this,
but I think that reflections are ~~fun~~ scary!
---
I am not sure how many people are aware of this, but I am going to share it
anyway because it is a thing I kindof like doing while being bored. One day, I
was on the Internet seeing what new things I can learn and explore. I was
getting bored. And suddenly I see an article titled ["Glass Reflections in
Pictures + OSINT = More Accurate
Location](https://ioactive.com/glass-reflections-in-pictures-osint-more-accurate-location/).
Now that, my friend, is something to fill my boredom with.
I'm not sure how many people are aware of this, but I'm going to share it anyway because it's a thing I kindof like doing while being bored.
One day, I was on the Internet seeing what new things I can learn and explore. I was getting bored. And suddenly I see an article titled ["Glass Reflections in Pictures + OSINT" = More accu..](https://ioactive.com/glass-reflections-in-pictures-osint-more-accurate-location/). Now that my friend, is something to fill my boredom with hehee
I instantly take a look at it and next thing I know I am amazed by it.
Reflections are just so cool! To be fair, I think I have been using reflections
way before that day even, but this article taught me something new. I have to
pay close attention as well. Not just with pictures, but also real life!
I instantly take a look at it and next thing I know I'm amazed by it. Reflections are just so cool! To be fair, I think I've been using reflections way before that day even, but this article taught me something new. I have to pay close attention as well. Not just with pictures, but also real life!
Some great examples of what I'm talking about:
- The bus (at this point literally engineered to stalk others lol. Look out the window and you can see the phone of the person that's right in front of you.
- My computer whose left side is covered with glass. If you come in my room, you may catch a frame or two of my monitors because of the reflections from the monitor to the glass of my computer to your eyes.
- Eyeglasses (I think there was even a study where OSINT experts tried to recover X% of the user's screen by just looking at the reflection in their glasses though a video call - wasn't able to find it unfortunately, but I remember the percentage was super high in some example rooms)
Some great examples of what I am talking about:
- The bus (at this point literally engineered to stalk others lol. Look out
the window and you can see the phone of the person that is right in front of
you.
- My computer whose left side is covered with glass. If you come in my room,
you may catch a frame or two of my monitors because of the reflections from
the monitor to the glass of my computer to your eyes.
- Eyeglasses (I think there was even a study where OSINT experts tried to
recover X% of the user's screen by just looking at the reflection in their
glasses though a video call - was not able to find it unfortunately, but I
remember the percentage was super high in some example rooms)

View File

@ -1,18 +1,26 @@
---
title: "Weekend Reseach"
date: 2023-11-12T11:56:14+01:00
tags: ["sharing"]
---
If anybody is going through this weekend endlessly searching for purpose, here is some material your brain might find appealing:
If anybody is going through this weekend endlessly searching for purpose, here
is some material your brain might find appealing:
- **Write about what you learn. It pushes you to understand topics better**: [addyosmani.com/...](https://addyosmani.com/blog/write-learn/)
- **Detecting Exploits - Linux Logging with Auditd**: [youtube.com/...](https://www.youtube.com/watch?v=lc1i9h1GyMA)
- **Reading Linux v0.01**: [seiya.me/...](https://seiya.me/blog/reading-linux-v0.01)
- **Rkhunter - Rootkit Scanner**: [wiki.archlinux.org/...](https://wiki.archlinux.org/title/Rkhunter)
- **Trolling your neighbours using Iptables**: [ex-parrot.com/...](https://pete.ex-parrot.com/upside-down-ternet.html)
- **Algorithms for Modern Hardware**: [en.algorithmica.org/...](https://en.algorithmica.org/hpc/)
- **Miller in 10 minutes**: [miller.readthedocs.io/...](https://miller.readthedocs.io/en/6.9.0/10min/)
- **Hardware Security - Eldritchdata**: [eldritchdata.neocities.org/...](https://eldritchdata.neocities.org/CGFTPU/HardwareSecurity)
- Write about what you learn. It pushes you to understand topics better:
[addyosmani.com/...](https://addyosmani.com/blog/write-learn/)
- Detecting Exploits - Linux Logging with Auditd:
[youtube.com/...](https://www.youtube.com/watch?v=lc1i9h1GyMA)
- Reading Linux v0.01:
[seiya.me/...](https://seiya.me/blog/reading-linux-v0.01)
- Rkhunter - Rootkit Scanner:
[wiki.archlinux.org/...](https://wiki.archlinux.org/title/Rkhunter)
- Trolling your neighbours using Iptables:
[ex-parrot.com/...](https://pete.ex-parrot.com/upside-down-ternet.html)
- Algorithms for Modern Hardware:
[en.algorithmica.org/...](https://en.algorithmica.org/hpc/)
- Miller in 10 minutes:
[miller.readthedocs.io/...](https://miller.readthedocs.io/en/6.9.0/10min/)
- Hardware Security - Eldritchdata:
[eldritchdata.neocities.org/...](https://eldritchdata.neocities.org/CGFTPU/HardwareSecurity)
Wish you a wonderful day!

View File

@ -1,81 +1,129 @@
---
title: "Secure Linux Setup"
date: 2023-04-12T11:53:13+02:00
tags: ["linux", "internet security", "privacy"]
image: /images/memes/oh_no.jpg
---
This post is dedicated to the ones that have been in the Linux game for years now or have just started experimenting, but don't have a very secure system.
But wait, what do I mean by *secure*? Well, a lot of factors come down to how secure your system is. **And by no means I'm claiming that this will
be a guide to *perfect security*. Let alone *perfect anonymity*.** That's simply because you cannot be 100% secure and anonymous online. It's a fact.
What I want to teach you with this post, is how to increase your anonymity. How to increase your security. How to make your life easier in case something
bad happens to your data.
This post is dedicated to the ones that have been in the Linux game for years
now or have just started experimenting, but do not have a very secure system.
But wait, what do I mean by secure? Well, a lot of factors come down to how
secure your system is. And by no means I am claiming that this will be a guide
to perfect security. Let alone perfect anonymity. That is simply because you
cannot be a hundred percent secure and anonymous online. It is a fact. What I
want to teach you with this post, is how to increase your anonymity. How to
increase your security. How to make your life easier in case something bad
happens to your data.
Throughout the post you may notice how nicely all the security practices connect. One being dependent of the other. Creating a nice security framework for your computer.
Throughout the post you may notice how nicely all the security practices
connect. One being dependent of the other. Creating a nice security framework
for your computer.
---
First off, you have to understand how important data is. You need to have a reason to hide or protect it. The reason usually comes after some time when you realize
how much surveillance is happening on a tick-per-tick basis. The possibility of you giving a shit about your data can go even lower if you're still a teenager.
After you get a job, mature, realize how cruel the world is, you'll start caring much more about freedom in general. And so should you about Internet freedom, privacy, security, etc.
First off, you have to understand how important data is. You need to have a
reason to hide or protect it. The reason usually comes after some time when you
realize how much surveillance is happening on a tick-per-tick basis. The
possibility of you giving a shit about your data can go even lower if you are
still a teenager. After you get a job, mature, realize how cruel the world is,
you will start caring much more about freedom in general. And so should you
about Internet freedom, privacy, security, etc.
## 1 Passwords
Let's talk ~~basics~~ passwords. They're not that simple to deal with. I know that. We all do. And so, let's facilitate it to a concept that you're already familiar with - Password Managers.
No, I'm not going to be selling you a Password Manager, or telling you about this awesome service that helped me stay secure for the past X years. Keeping your credentials on a third-party service is not even a good option - as you can see [here](https://www.youtube.com/watch?v=cRsn0PlnuvM).
I'm going to give you an open-source tool that has made my life eaiser when dealing with passwords. You're free to find alternatives, but for me, this was the best I was able to find.
Let's talk ~~basics~~ passwords. They are not that simple to deal with. I know
that. We all do. And so, let's facilitate it to a concept that you are already
familiar with - Password Managers. No, I am not going to be selling you a
Password Manager, or telling you about this awesome service that helped me stay
secure for the past X years. Keeping your credentials on a third-party service
is not even a good option - as you can see
[here](https://www.youtube.com/watch?v=cRsn0PlnuvM). I am going to give you an
open-source tool that has made my life eaiser when dealing with passwords. You
are free to find alternatives, but for me, this was the best I was able to
find.
It's called [KeePassXC](https://keepassxc.org/). It's cross-platform and you can run it on Linux - which is exactly what we needed. Passwords are stored in a file called a *Database* which contains groups.
A group can either contain more groups, or simply passwords. The whole database is by default encrypted with the industry-standard AES256 and a key provided by the user (make sure it's a long one that you can remember).
It is called [KeePassXC](https://keepassxc.org/). It is cross-platform and you
can run it on Linux - which is exactly what we needed. Passwords are stored in
a file called a Database which contains groups. A group can either contain more
groups, or simply passwords. The whole database is by default encrypted with
the industry-standard AES256 and a key provided by the user (make sure it is a
long one that you can remember).
For more security, the user is advised to distribute passwords across multiple databases. For example:
- **VMs database:** passwords regarding all VMs on the user's computer (VM's encrypted disk, users, etc.)
- **Hardware database:** passwords regarding user's hardware (encrypted USB keys, hard drives, etc.)
- **Social database:** passwords regarding social media
- **Finance database:** passwords regarding finance (bank accounts, crypto accounts, etc.)
- **Work database:** passwords regarding your work
For more security, the user is advised to distribute passwords across multiple
databases. For example:
- VMs database: passwords regarding all VMs on the user's computer (VM's
encrypted disk, users, etc.)
- Hardware database: passwords regarding user's hardware (encrypted USB keys,
hard drives, etc.)
- Social database: passwords regarding social media
- Finance database: passwords regarding finance (bank accounts, crypto
accounts, etc.)
- Work database: passwords regarding your work
## 2 VMs (Virtual Machines)
Virtual machines are so underrated for desktop usage. And that's sad because they're so flexible and useful when it comes to security!
Example of a VM security framework:
- **Gaming VM**: strictly use for gaming ([#moreinfo](https://www.youtube.com/watch?v=BNLnTCqUMyY))
- **Work VM:** strictly use for work stuff
- **Social VM:** strictly use for social media
Virtual machines are so underrated for desktop usage. And that is sad because
they are so flexible and useful when it comes to security! Example of a VM
security framework:
- Gaming VM: strictly use for gaming
([#moreinfo](https://www.youtube.com/watch?v=BNLnTCqUMyY))
- Work VM: strictly use for work stuff
- Social VM: strictly use for social media
- ...
> **💡 Hint:** notice how password databases can now be isolated across your VMs. So each VM has only the passwords **it** needs.
> Hint: notice how password databases can now be isolated across your VMs. So
> each VM has only the passwords it needs.
## 3 Backups
Backing up important information is very important. Especially if your income depends on it. This might include the password databases I've mentioned earlier, high importance VMs,
pictures, projects, work, presentations, plans, goals, etc. First, if you've got some money to spare, invest 100-200 dollars into backup disks because you're gonna need them.
Else you can simply try to get them over a longer period of time, or backup your things to USB sticks. After that, you have two options:
Backing up important information is very important. Especially if your income
depends on it. This might include the password databases I have mentioned
earlier, high importance VMs, pictures, projects, work, presentations, plans,
goals, etc. First, if you have some money to spare, invest 100-200 dollars into
backup disks because you are gonna need them. Else you can simply try to get
them over a longer period of time, or backup your things to USB sticks. After
that, you have two options:
- Find some backup tool that does all the hard work
- Script your own tool - giving you more freedom to customize the backup system
- Script your own tool - giving you more freedom to customize the backup
system
In my case specifically, I like designing the structure of my computer. And so, I created [my own script](https://gist.github.com/0xdeadbeer/1393329c9d08b858befe384cbf1e2142). You can use it if you want.
With that step done, you have to automate the process of calling this tool X times per day. X may depend on how you design your backup system, but for me 3 to 2 times each day is more than enough.
In my case specifically, I like designing the structure of my computer. And so,
I created [my own
script](https://gist.github.com/0xdeadbeer/1393329c9d08b858befe384cbf1e2142).
You can use it if you want. With that step done, you have to automate the
process of calling this tool X times per day. X may depend on how you design
your backup system, but for me 3 to 2 times each day is more than enough.
> **💡 Hint:** such automation is usually achieved with [cronjobs](https://victoria.dev/blog/a-cron-job-that-could-save-you-from-a-ransomware-attack/).
> Hint: such automation is usually achieved with
> [cronjobs](https://victoria.dev/blog/a-cron-job-that-could-save-you-from-a-ransomware-attack/).
Another cool thing you can do is self-host a server and send backups over there. Or even better, agree with more people to host a server somewhere and each have your own copies over there. Of course, don't forget about encryption and access permissions ;)
Another cool thing you can do is self-host a server and send backups over
there. Or even better, agree with more people to host a server somewhere and
each have your own copies over there. Of course, do not forget about encryption
and access permissions ;)
> **💡 Hint:** backups over network can be achieved with [rsync](https://linux.die.net/man/1/rsync) or [rclone](https://rclone.org/) as far as I know.
> Hint: backups over network can be achieved with
> [rsync](https://linux.die.net/man/1/rsync) or [rclone](https://rclone.org/)
> as far as I know.
## 4 File Recovery
Be careful how you delete files. Especially if you're going to be selling your disk or something. Data may not be 100% deleted like you think it might be. That's why I never buy/sell used disks. Because it's just not worth it.
For the sake of security, whenever you delete a file, it usually just gets flagged as "NEW DATA, OVERWRITE ME PLEASE". And so you haven't actually *deleted* the contents, you've just removed it from the filesystem's structure and told it that what was once a file is now *usable space waiting to be overwritten*.
Be careful how you delete files. Especially if you are going to be selling your
disk or something. Data may not be 100% deleted like you think it might be.
That is why I never buy/sell used disks. Because it is just not worth it. For
the sake of security, whenever you delete a file, it usually just gets flagged
as "NEW DATA, OVERWRITE ME PLEASE". And so you have not actually deleted the
contents, you have just removed it from the filesystem's structure and told it
that what was once a file is now usable space waiting to be overwritten.
And guess what, that data which hasn't been yet overwritten can be read. And pretty easily I might add. [#moreinfo1](https://www.youtube.com/watch?v=0WcrgvhO_mw) [#moreinfo2](https://wiki.archlinux.org/title/file_recovery)
And guess what, that data which has not been yet overwritten can be read. And
pretty easily I might add.
[#moreinfo1](https://www.youtube.com/watch?v=0WcrgvhO_mw)
[#moreinfo2](https://wiki.archlinux.org/title/file_recovery)
But how do you make sure it is actually deleted? Well, a good tool to look into is [shred](https://wiki.archlinux.org/title/Securely_wipe_disk) (Securely Wipe Disk)
But how do you make sure it is actually deleted? Well, a good tool to look into
is [shred](https://wiki.archlinux.org/title/Securely_wipe_disk) (Securely Wipe
Disk)
> **💡 Hint:** a cool one-liner I've learned recently from [Luke Smith](https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA) is ```dd if=/dev/random of=/tmp/erase_secrets; rm -rf /tmp/erase_secrets```. The command fills the disk with random data (overwriting all the not-fully-deleted-data and then deallocates the file from the file-system).
---
> **✨ Something new:** recently I was introduced to the concept of SELinux. And although it might fit this post perfectly, I'm failrly new to that concept so it's excluded for now. I might edit it in the future or make a new post altogether. Of course, if you're interested, here's a [link](https://selinuxproject.org/page/Main_Page)
> Hint: a cool one-liner I have learned recently from [Luke
> Smith](https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA) is ```dd
> if=/dev/random of=/tmp/erase_secrets; rm -rf /tmp/erase_secrets```. The
> command fills the disk with random data (overwriting all the
> not-fully-deleted-data and then deallocates the file from the file-system).

View File

@ -1,21 +1,59 @@
---
title: "Switching to Linux"
date: 2023-04-08T15:44:15+02:00
tags: ["linux"]
image: /images/memes/linux_meme.png
---
**Classy meme, innit?**
Going from hearing about this word "Linux" from one of my computer geek
friends, to installing it as my first VM, to making the switch, to then spread
the word about how cool it is and the practical benefits that it can provide. I
love Linux! And I got tied into it is ecosystem so hard that going back to
Windows would instantly harm my productivity and make everything much more
difficult. Ignoring the war of Windows - MacOS - Linux, I am going to talk about
my switch. How did I switch to Linux? How can YOU switch to Linux? What is the
safest way to switch without losing all of your data that you accumulated over
the years?
Before switching, here is something you have to know. Linux will be different
than Windows and even if you think you wll be okay without Windows because of
XYZ (say for example: you are a software engineer or something and know your
way around computers), you must accept the fact that there will be a learning
process lying ahead of you. And if you wll skip it, it will most likely end
badly. Keep your curiosity and goals up and you might just make it passed the 5
reinstalls you are most likely going to do before getting quite comfortable with
Linux.
Going from hearing about this word "Linux" from one of my computer geek friends, to installing it as my first VM, to making the switch, to then spread the word about how cool it is and the practical benefits that it can provide. I love Linux! And I got tied into it's ecosystem so hard that going back to Windows would instantly harm my productivity and make everything much more difficult. Ignoring the war of Windows - MacOS - Linux, I'm going to talk about my switch. How did I switch to Linux? How can YOU switch to Linux? What's the safest way to switch without losing all of your data that you accumulated over the years?
Much of the applications you used on Windows will have different names on
Linux, and at some point or another, you will have to get familiar with the
terminal. So the sooner you get used to CLI (Command Line Interface), the
better. Watch out for the commands you copy-paste into your terminal,
especially at the beginning. Not just because someone might want to steal your
data, but also because you might end up breaking your computer accidentally.
Acknowledge that you are going to make mistakes in the future and start making
backups of your files as soon as you know you are storing valuable information
into your disk. That was (and still is) one of the most fun challenges for me
personally. I love designing a whole backup system for my Linux and I am
constantly updating it as my demands are slowly shifting. For example: recently
I have been introduced the idea of file recovery - and even though I knew you
could technically read deleted files off the disk it did not scare me that much.
But now that I know how easy it is, I am paying a lot more attention to how my
backup scripts copy files from one disk to another. And that is the beauty!
Using Linux will be so cool you cannot even imagine! The deeper you will go the
more interesting it will get!
---
With that said, you might think that my switch was flawless? Pfttt, do not make
me laugh. Did I ever tell you about that one time when I selected the wrong
disk for installation and ended up losing 1TB of data? Not to mention all the
hiccups I had to deal with, such as dependency hell, grub booting me into a
shell rather than a display manager, Windows deciding to fuck up my Linux
installation (that is when I was still dual booting it), and so on. In short,
it was a pain to get where I am today. And that is what taught me Linux. Making
mistakes is the key to learning.
Before switching, here's something you have to know. Linux will be different than Windows and even if you think you'll be okay without Windows because of XYZ (say for example: you are a software engineer or something and know your way around computers), you must accept the fact that there will be a learning process lying ahead of you. And if you'll skip it, it will most likely end badly. Keep your curiosity and goals up and you might just make it passed the 5 reinstalls you're most likely going to do before getting quite comfortable with Linux.
Much of the applications you used on Windows will have different names on Linux, and at some point or another, you will have to get familiar with the terminal. So the sooner you get used to CLI (Command Line Interface), the better. Watch out for the commands you copy-paste into your terminal, especially at the beginning. Not just because someone might want to steal your data, but also because you might end up breaking your computer accidentally. Acknowledge that you're going to make mistakes in the future and start making backups of your files as soon as you know you're storing valuable information into your disk. That was (and still is) one of the most fun challenges for me personally. I love designing a whole backup system for my Linux and I'm constantly updating it as my demands are slowly shifting. For example: recently I've been introduced the idea of file recovery - and even though I knew you could technically read deleted files off the disk it didn't scare me that much. But now that I know how easy it is, I'm paying a lot more attention to how my backup scripts copy files from one disk to another. And that's the beauty! Using Linux will be so cool you cannot even imagine! The deeper you'll go the more interesting it'll get!
With that said, you might think that my switch was flawless? Pfttt, don't make me laugh. Did I ever tell you about that one time when I selected the wrong disk for installation and ended up losing 1TB of data? Not to mention all the hiccups I had to deal with, such as dependency hell, grub booting me into a shell rather than a display manager, Windows deciding to fuck up my Linux installation (that's when I was still dual booting it), and so on. **In short, it was a pain to get where I am today. And that's what taught me Linux. Making mistakes is the key to learning.**
Thankfully, after 2-3 solid years of experimenting with Linux, I can say that I'm pretty stable. I know my way around Arch quite well, but I'm not negating the fact, that I still have a lot to learn. There's probably tens of thousands of tools in the Arch Wiki that I haven't heard of. And if you happen to know some cool tools, for crying out loud don't hesitate to share them online. Linux-passionates will love you for sharing those incredible resources, or for just having the thought of sharing. And so, that's what I want to achieve with this blog. **Sharing is carying!**
Thankfully, after 2-3 solid years of experimenting with Linux, I can say that
I am pretty stable. I know my way around Arch quite well, but I am not negating
the fact, that I still have a lot to learn. There is probably tens of thousands
of tools in the Arch Wiki that I have not heard of. And if you happen to know
some cool tools, for crying out loud do not hesitate to share them online.
Linux-passionates will love you for sharing those incredible resources, or for
just having the thought of sharing. And so, that is what I want to achieve with
this blog. Sharing is carying.

View File

@ -0,0 +1,80 @@
---
title: "The Hacker Mindset"
date: 2024-02-24T16:43:00+01:00
---
![Cliff Stoll: Good Science](/images/cliff.jpg)
Image credit: [AT&T Tech Channel - Cliff Stoll: Good
Science](https://www.youtube.com/watch?v=xHEIOgONq6A)
First, there comes excruciating pain. Suddenly, an eye blinding flash travels
across his eyes. Look at him. He finally gazed outside the womb. He is now a
small fraction of this world and all of its complications. Where will this
child go? Just how will reality shape him? Will he break and succumb to
despair, or regrow into an even more resilient, mature human? As the mother
cries in joy, his little neurons start to fire little sparks of data that
resonate all across his brain from hemisphere to hemisphere. And they do so
very quickly. With a sheer speed of 100 meters per second. His brain has
millions if not billions of connections! That is not a super computer. That is
a human.
Before his parents know it, he is already learning his first ABCs and doing
basic mathematics. A few years pass, and he starts developing new emotions.
More years pass and he is capable of deep abstract thought. Curiosity and
questions are like fuel and oxygen. Waiting for the little spark to complete
the job and burst into a violent reaction of fire. For knowledge. A new
experiment proves to be as exciting as a new question. Forcing the child to
push the limits of his brain and make connections based on his experience, or
lack thereof.
This is how I like to describe hackers. We lack hackers. Passionate people.
People that will pass knowledge down the generations with real excitement. And
you cannot imagine THE BEST of such people until you see them in action. If you
scout through the internet carefully, you might notice them. Here are some that
I cannot help myself but to share. For they have deeply impacted my thinking:
- [John D. Boswell](https://www.youtube.com/@melodysheep)
- [Richard Feynman](https://www.youtube.com/watch?v=P1ww1IXRfTA)
- [Cliff Stoll](https://www.youtube.com/watch?v=Qt0844ViQDI)
- [Tom Scott](https://www.youtube.com/@TomScottGo)
- [Richard Stallman](https://www.gnu.org/)
- [Khan Academy](https://www.khanacademy.org/)
“Hackers”. I am not referring to cyber security specialists, consultants, or
attackers, although they do constitute a big portion of individuals with such
a mentality. I am referring to people that wonder and explore. What hackers
used to be defined as before media acted out with its usual "drama, drama,
drama.. drama" move and pictured us as "the bad guys". The bad guys are not
hackers. They are criminals. End of the story.
Why do we lack them? Because people are not flawless. We make mistakes, even
when we think we are doing the right thing. A statement kills curiosity. It
closes your options and puts you on a single track. Some parents do that. Some
teachers do that. Which can have profound effects on the child. Children need
questions. They are born to be curious. If the environment models them to be
silent, shut up, and not question about the system or statement in question,
how will they ever familiarize themselves with it? That is why extreme patience
is needed when introducing somebody to a topic. Especially children.
Is there a way out of such closed thinking? Perhaps. For me it was FOSS (Free
and Open-Source Software). I no longer am tied to a proprietary system that I
detest. I am free to use my computer however I like. Which pushes me to
understand my own system better and in more depth. It enables me to think in
new ways and make my computer do funny things. Even if impractical, it still
is.. fun. The reason behind it also lies in data protection and privacy. But
that is another discussion. For you, the entry point might also reside in FOSS,
or maybe mathematics, physics, chemistry, biology, etcetera. At the end of the
day, all major subjects are fundamentally interlinked. Curiosity will push you
outside of your own field if you just let it do so. That is when you will
realize that every subject has a profound meaning and beauty.
The greatest twist will come when you discover something new on your own that
is interlinked with what you know you LOVE doing. But that resides inside a
completely different field that you remember hating because of a past
experience - like school.
This is what I learned in my concluding years of adolescence. I now like to
think optimistically about the coming generations. Let's take care and be
welcoming of our future pioneers. Lets respect the work of the ones who came
before us. They are after all, the reason why we are here.

View File

@ -1,52 +1,62 @@
---
title: "The Machinery of Life"
date: 2023-12-13T23:25:43+01:00
image: /images/the_machinery_of_life.png
---
For my 18th birthday, I asked my relatives for some books that I haven't gotten to yet in my read list.
One particularly stood out.. titled The Machinery of Life from David S. Goodsell.
I remember noting this title after watching a live stream from one of my most respected YouTubers, [@TheThoughtEmporium](https://www.youtube.com/@thethoughtemporium).
![The Machinery of Life](/images/the_machinery_of_life.png)
The live was about starting out in genetic engineering. How difficult it is, how expensive can it get, all the caveats that come along the way, etc.
I don't know why I watched that live. Maybe just because the title seemed cool and interesting. But after finishing the live stream and noting a couple of
interesting resources Justin offered (books, websites, ...), I closed my text editor and never looked at that notes file again.
Re-seeing this title in my notes file right before my birthday made me want to explore it. And so this is what I got.
For my 18th birthday, I asked my relatives for some books that I have not
gotten to yet in my read list. One particularly stood out.. titled The
Machinery of Life from David S. Goodsell. I remember noting this title after
watching a live stream from one of my most respected YouTubers,
[@TheThoughtEmporium](https://www.youtube.com/@thethoughtemporium).
I must say that I have been really enjoying this book, even though I haven't devoted many hours of my life to biology - and my main focus is still in computer science.
I particularly like the illustrations, most of which were (apparently) either hand drawn with watercolors (see the thumbnail) or rendered by a computer.
The live was about starting out in genetic engineering. How difficult it is,
how expensive can it get, all the caveats that come along the way, etc. I do
not know why I watched that live. Maybe just because the title seemed cool and
interesting. But after finishing the live stream and noting a couple of
interesting resources Justin offered (books, websites, ...), I closed my text
editor and never looked at that notes file again. Re-seeing this title in my
notes file right before my birthday made me want to explore it. And so this is
what I got.
As this is my first book that delves deep into biology, reading it is a real perspective shifter an a half!
I never considered the level of complexity one has to fight when dealing with biology at such a minuscule level.
I must say that I have been really enjoying this book, even though I have not
devoted many hours of my life to biology - and my main focus is still in
computer science. I particularly like the illustrations, most of which were
(apparently) either hand drawn with watercolors (see the thumbnail) or rendered
by a computer.
---
As this is my first book that delves deep into biology, reading it is a real
perspective shifter an a half! I never considered the level of complexity one
has to fight when dealing with biology at such a minuscule level.
Here's my favorite quote, taken directly from the book:
Here is my favorite quote, taken directly from the book:
```
..................................Cells in our retina are filled with
arrays of opsin proteins for sensing light, light that is focused by
layers of eye lens cells packed full of clear crystalling proteins. Cells in
our skin spin enormously long strands of keratin proteins into hairs,
and other cells sense their slightest movement. These and other
sensory data are transmitted and processed by nerve cells that carry
electrical currents propagated by proteins and insulated by con-
centric layers of lipid. Fine control of movement is accomplished by
an enormous skeleton of mineralized bone cells, moved by muscle
cells filled with proteins that do nothing but contract, all glued
together by connective tissue cells that built tough layers of sugar
and protein...........................................................
arrays of opsin proteins for sensing light, light that is focused by layers of
eye lens cells packed full of clear crystalling proteins. Cells in our skin
spin enormously long strands of keratin proteins into hairs, and other cells
sense their slightest movement. These and other sensory data are transmitted
and processed by nerve cells that carry electrical currents propagated by
proteins and insulated by con- centric layers of lipid. Fine control of
movement is accomplished by an enormous skeleton of mineralized bone cells,
moved by muscle cells filled with proteins that do nothing but contract, all
glued together by connective tissue cells that built tough layers of sugar and
protein...........................................................
```
It's so beautiful how, with some imagination, you can picture the author
taking you to every part of your body. Imagine just how complex that system
has to be to work so well for such a long time and be able to sustain itself
while running. It's also an amazing analogy I remember from the book..
It is so beautiful how, with some imagination, you can picture the author
taking you to every part of your body. Imagine just how complex that system has
to be to work so well for such a long time and be able to sustain itself while
running. It is also an amazing analogy I remember from the book..
```
...............................................Think about this
feat for a moment-it is remarkable. You can't take your cells to a
shop for repairs, like you would with a broken clock. Cells must make
their repairs in place, without ever disturbing the ongoing processes of
living. Imagine replacing a worn fan belt on your car, but doing it while
driving down the road.................................................
...............................................Think about this feat for a
moment-it is remarkable. You can't take your cells to a shop for repairs, like
you would with a broken clock. Cells must make their repairs in place, without
ever disturbing the ongoing processes of living. Imagine replacing a worn fan
belt on your car, but doing it while driving down the road...................
```

View File

@ -0,0 +1,19 @@
---
title: "Types of Galaxies"
date: 2024-06-16T21:57:16+02:00
---
> SOURCE: https://openstax.org/details/books/astronomy-2e
## Spiral Galaxies
Spiral galaxies consist of:
- a bulge,
- a halo,
- spiral arms,
- a disk
## Elliptical Galaxies
## Irregular Galaxies

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 KiB

View File

@ -1,662 +0,0 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@ -1,325 +0,0 @@
![logo](static/logo.svg)
# Ficurinia
A prickly blog theme for Hugo
![](images/tn.png)
# [Demo](https://gabmus.org)
[Code for the demo website](https://gitlab.com/gabmus/gabmus.gitlab.io) (really my personal website)
[Screenshot gallery](https://gabmus.gitlab.io/hugo-ficurinia-screenshots/) showcasing 256 of the possible configurations that Ficurinia offers.
# Customization
## Configuration
These are some parameters you can use in your `config.toml` to customize Ficurinia:
```toml
baseURL = "https://example.com/"
theme = "hugo-ficurinia"
title = "My nice blog"
languageCode = "en"
defaultContentLanguage = "en"
# this will be included in the footer after the current year the site is last
# built, followed by the (c) symbol
# you can use markdown inside this field
copyright = "Some copyright notice - [my license](https://example.com/license)"
paginate = 5 # number of articles per page in the index
summaryLength = 70 # number of words for article summaries
[params]
author = "Gabriele Musco"
description = "A description for my website" # this will be added as metadata
posts = "posts" # content directory where to find home page posts; default searches in "posts" and "post"
showPostsLink = true # show or hide the link to the simple post list
extraContentDirs = [] # other content directories to render similarly to the home page
showcaseDir = "showcase" # create a content directory that shows a special showcase section in the home page
# shows a specified single page as a home page, instead of the traditional articles list
# requires setting `homeSinglePage`
# goes well with extraContentDirs
showSinglePageAsHome = false
homeSinglePage = "/home"
# It's best to put these icons in the "static" folder of your site
logo = "/logo.svg"
favicon = "/favicon.png" # 32x32
faviconIco = "/favicon.ico" # 32x32
appletouch = "/apple-touch-icon.png" # 180x180
svgicon = "/logo.svg"
icon512 = "/icon512.png" # 512x512 png image
logoRightOfTitle = false # positions the logo to the right of the title; default: false
showTags = true # show the Tags menu item; default true
showRss = true # show the link for the RSS feed; default true
imageInArticlePreview = false # show images in article preview; default false
fitImageInArticlePreview = false # make article preview images fit the article preview instead of getting cropped
articleSummary = true # show a summary in article preview; default true
fontFamily = "JetBrains Mono" # changes the font, default "JetBrains Mono"
titleFontFamily = "JetBrains Mono" # font used for titles and headings
monospaceFontFamily = "JetBrains Mono" # changes the monospace font for code, default "JetBrains Mono"
# multipliers applied to font sizes, useful for custom fonts that may be too big or too small
titleFontSizeMultiplier = 1.0
mainFontSizeMultiplier = 1.0
monoFontSizeMultiplier = 1.0
contentWidth = "1000px" # maximum width of the site content, css syntax
paperCards = false # enable paper card style; default false
buttonTags = false # enable button tag style; default false
tagsInArticlePreview = true # enable tags list in the article preview card
gridView = false # show post list as a grid. goes well with paperCards
bigArticleTitle = false # makes the title in the single article view bigger
navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles"
enableShadow = false # shows a shadow around some elements
menuStyle = "standard" # changes the style of the main site navigation menu, available styles are: "standard", "buttons"
inputStyle = "standard" # changes the style of inputs (like the searchbar), available styles are: "standard", "buttons"
enableSearch = true # enable search page
searchbarEverywhere = true # if the searchbar should be shown in every page; requires enableSearch
searchMenuLink = false # add a search link to the navigation menu; requires enableSearch
mobileHamburgerNav = false # alternative hamburger menu layout for the main nav menu when screen is small
enableFeatured = false # enable a particular view for articles marked as featured (featured: true in the article frontmatter)
underlineTitleLinks = false # show an underline also for links that are titles
# enable comments support with commento using the script from your server
commento = "https://example.com/js/commento.js"
# enable comments support with cactus comments (cactus.chat)
cactusCommentsSiteName = "example.com"
cactusCommentsServerName = "cactus.chat"
cactusCommentsHomeserver = "https://matrix.cactus.chat:8448"
# enable analytics using Plausible
plausibleScriptUrl = "https://something.com/..."
plausibleDomain = "example.com"
# enable analytics using Umami
umamiScriptUrl = "https://something.com/..."
umamiWebsiteId = "example-tracking-code"
enableShareOnFediverse = false # enable a button at the end of an article to share it on the fediverse
tocBeforeImage = false # show the table of contents before the main article image; default false
# WARNING: deprecated! Use [[menu.icons]] instead, look below
# links = [
# ["GitLab", "https://gitlab.com/gabmus"],
# ["GNOME", "https://gitlab.gnome.org/gabmus"],
# ["YouTube", "https://youtube.com/TechPillsNet"]
# ]
# you can customize all of the colors in this theme
# Colors are defined in data/colors.yml
# alternative sidebar layout
enableSidebarLayout = false
tocInSidebar = false # if the sidebar is enbabled, show the TOC in the sidebar
# redirect to baseURL if current URL host doesn't match
# useful if deploying in gitlab pages with custom domain and don't want
# the username.gitlab.io/website url to persist
# this requires you to set baseURL (see above)
forceRedirect = false
infiniteScrolling = false # activates infinite scrolling instead of regular pagination
enableFooterColumns = false # activates footer columns, as described below
enableJumbotron = false # enables jumbotron, as described below
# related articles will be selected randomly based on tags and shown at
# the bottom of the article, after the comments
enableRelatedArticles = false
relatedArticlesNum = 2 # how many related articles to show
randomRelated = false # sorts related articles in random order (randomized at built time)
[menu]
# these links will be added to the main navigation menu, sorted by weight
# other elements in this menu are added automatically from the "pages" folder
# the folder it will look into can be customized with the pages variable
# in params above
[[menu.main]]
identifier = "about"
name = "About"
url = "/about/"
weight = 10
# these links (menu.icons) will be added as icon links below the main nav
[[menu.icons]]
identifier = "gitlab"
name = "GitLab"
url = "https://gitlab.com/gabmus"
weight = 10
[[menu.icons]]
identifier = "gnome"
name = "GNOME GitLab"
url = "https://gitlab.gnome.org/gabmus"
weight = 20
# this section is necessary if you want infinite scrolling
# it allows to output the article list as paged JSON so that "pages" can be retrieved via javascript
[outputs]
home = ["HTML", "JSON"]
```
### Supported icons
For the `[[menu.icons]]` menu. They match identifier, name and url can be whatever. Here's a list of supported identifiers:
- discord
- email
- facebook
- github
- gitlab
- gnome
- instagram
- linkedin
- mastodon
- matrix
- peertube
- phone
- pleroma
- rss
- steam
- telegram
- twitter
- xmpp
- youtube
## Colors
Colors are completely customizable. They are defined in [`data/colors.yml`](data/colors.yml). Just copy that file over to `yoursite/data/colors.yml` and customize it to your liking.
## Footer columns
You can add various columns of links in the footer using the `data/footer_columns.yml` file.
Following is an example configuration:
```yaml
- title: My other projects
links:
- title: HydraPaper
link: https://hydrapaper.gabmus.org
- title: Ada UI
link: https://gitlab.com/gabmus/ada-ui
- title: About me
links:
- title: My personal website
link: https://gabmus.org
- title: My GitLab
link: https://gitlab.com/gabmus
- title: My GNOME GitLab
link: https://gitlab.gnome.org/gabmus
```
## Jumbotron
You can add a jumbotron at the beginning of the home page using the `data/jumbotron.yml` file.
Following is an example configuration:
```yaml
title: My awesome website
hugeTitle: false
subtitle: Some fancy subtitle
image: /jumbotron_image.svg
imagePosition: left # values: left, right, top, bottom
background: /img/jumbotron_bg.png
backgroundVideo: /jumbotron_video.mp4 # will replace the background image
# it's best to provide both an mp4 and a web source for the video for better compatibility
backgroundVideoMp4: /jumbotron_video.mp4
backgroundVideoWebm: /jumbotron_video.webm
videoOpacity: 1.0
textShadow: false
fullscreen: false
downArrow: false
whiteText: false # force white text in the jumbotron
links:
- title: About me
link: /pages/about
- title: Read my blog
link: /posts
```
# Post parameters
Every post can have various parameters in the frontmatter, here are some that you may find useful
- `title`: the title of the article
- `date`: usually automatically populated, holds the date and time of the post creation
- `description`: a brief description of the post, useful for SEO optimization
- `tags`: an array of tags, useful for searching similar articles
- `image`: a link to a feature image for the article, shown in the preview as well
- `alt`: alternative text to be shown if image is not available or fails to download
- `imageCaption`: a markdown text rendered as a caption for the article image described above
- `featured`: boolean, indicate if the post should be shown as featured
- `comments`: boolean, if true it enables comments for the current post, if false it disables them (default is true)
- `showDate`: boolean, true by default, if false hides the date. Useful for non-article pages where the date isn't important
- `showTitle`: boolean, true by default, if false hides the title.
- `showShare`: boolean, true by default, if false hides the share button.
- `norss`: boolean, if set to true the page will be skipped in the rss feed
- `nosearch`: boolean, if set to true the page won't show up in searches
- `toc`: boolean, if set to true a table of contents will be shown for the article
## Table of contents settings
You can tweak the TOC settings in your `config.toml`:
```toml
[markup]
[markup.tableOfContents]
endLevel = 5
ordered = false
startLevel = 1
```
# Generate icons
It's best to use the provided `generate_icons.sh` script to generate all necessary icons for your website. This script requires ImageMagick, that you will need to install separately.
For the best results, place your logo in svg format inside the `static` directory of your website, rename it to `logo.svg` and then call `./themes/hugo-ficurinia/generate_icons.sh static/logo.svg`.
The script will take care of generating all the icons you need.
Finally, make sure to edit your config.toml to include the following:
```toml
# ...
[params]
logo = "/logo.svg"
logoAltText = "Logo"
favicon = "/favicon.png"
faviconIco = "/favicon.ico"
appletouch = "/apple-touch-icon.png"
svgicon = "/logo.svg"
# ...
```
# Inject custom content
Ficurinia supports injecting custom content into the theme. There are several files you can create in `layouts/partials/inject` that will be included inside the theme in different places.
| Partial | Placement |
|---------|-----------|
| `layouts/partials/inject/body.html` | Before closing the `body` tag |
| `layouts/partials/inject/content-after.html` | After a post or page content |
| `layouts/partials/inject/content-before.html` | Before a post or page content |
| `layouts/partials/inject/footer.html` | At the beginning of the footer |
| `layouts/partials/inject/head.html` | Before closing the `head` tag |
| `layouts/partials/inject/header-after.html` | Before closing the header |
| `layouts/partials/inject/header-before.html` | At the beginning of the header |
# Does *Ficurinia* mean anything?
It's Sicilian for Indian fig, also known as prickly pear cactus.

View File

@ -1,11 +0,0 @@
---
title: "{{ replace (replace .Name "-" " ") "_" " " | title }}"
date: {{ .Date }}
tags:
- tag1
- tag2
- tag3
image:
comments: true
---

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><xsl:value-of select="/rss/channel/title"/> RSS Feed</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta charset="UTF-8"/>
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
<link type="text/css" rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" />
<style>
.aboutfeeds {
margin: 24px 0; padding: 12px;
border: 2px solid var(--default_accent);
background-color: var(--default_hl_bg)
}
.head {
display: flex;
flex-direction: row;
align-items: center;
}
.logo {
width: 50px;
max-height: 50px;
border-radius: 5px;
display: block;
margin-right: 10px;
}
.rssLogo {
display: block;
margin-right: 10px;
}
header h1 {
display: flex;
flex-direction: row;
align-items: center;
}
</style>
</head>
<body>
<header>
<h1>
<svg class="rssLogo" width="32" height="32" version="1.1" viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
>
<path fill="#ff7800"
d="M 4.9970764,0 H 26.997124 C 29.767161,0 31.9971,2.2300144 31.9971,4.9999764 V 27.000024 C 31.9971,29.770061 29.767086,32 26.997124,32 H 4.9970764 C 2.2270388,32 -0.0029,29.769986 -0.0029,27.000024 V 4.9999764 C -0.0029,2.2299388 2.2271144,0 4.9970764,0 Z"
/>
<path fill="#ffffff"
d="m 10.652345,21.357209 q 0.794754,0.795468 0.794754,1.931828 0,1.120137 -0.794754,1.915672 -0.7947706,0.795468 -1.9301364,0.795468 -1.1353653,0 -1.930136,-0.795468 -0.7947708,-0.795467 -0.7947708,-1.915672 0,-1.136377 0.7947708,-1.931828 0.7947707,-0.811691 1.930136,-0.811691 1.1353658,0 1.9301364,0.811691 z m 8.077348,3.668942 q 0.01682,0.405854 -0.243305,0.68182 -0.259516,0.292205 -0.664997,0.292205 h -1.913994 q -0.373047,0 -0.632562,-0.22728 -0.243306,-0.2435 -0.259515,-0.584427 -0.324402,-3.263021 -2.643912,-5.56829 Q 10.068158,17.298754 6.8243058,16.990274 6.4674686,16.957811 6.2241796,16.714291 5.9971,16.454549 5.9971,16.097399 v -1.915673 q 0,-0.422077 0.2919482,-0.681819 0.2433052,-0.22728 0.6163522,-0.22728 h 0.081045 q 2.2544878,0.178576 4.3307416,1.136377 2.076086,0.957803 3.681871,2.581269 1.621977,1.623399 2.579007,3.701423 0.97319,2.061749 1.151609,4.334538 z m 7.266385,0.01614 q 0.01682,0.405853 -0.243305,0.681819 -0.259516,0.275984 -0.665013,0.275984 h -2.027493 q -0.356836,0 -0.632578,-0.243502 -0.275724,-0.243504 -0.29195,-0.600637 -0.16226,-3.051983 -1.427332,-5.811809 -1.26514,-2.759827 -3.292615,-4.772772 Q 15.404609,12.542104 12.6472,11.275872 9.9061004,9.9933838 6.8567915,9.8310488 6.4999709,9.8148927 6.2404563,9.5550662 5.9971503,9.2953236 5.9971503,8.9219502 V 6.8926809 q 0,-0.3896138 0.2919481,-0.6493564 Q 6.5324037,5.9998227 6.905451,5.9998227 h 0.048594 q 3.730464,0.1948173 7.120435,1.7207897 3.406113,1.5097508 6.033714,4.1558116 2.660054,2.629906 4.168482,6.039004 1.524655,3.409099 1.719283,7.126678 z"
/>
</svg>
<xsl:value-of select="/rss/channel/title"/>
</h1>
<div class="aboutfeeds">
<p>This is a web feed, also known as an RSS feed. <strong>Subscribe</strong> by copying the URL into your RSS reader.</p>
</div>
<div class="head">
<div class="avatar">
<img class="logo" src="{{ .Site.Params.Logo }}" alt="Site Logo"/>
</div>
<div class="description">
<p><xsl:value-of select="/rss/channel/description"/></p>
<p><a hreflang="en"><xsl:attribute name="href"><xsl:value-of select="/rss/channel/link"/></xsl:attribute>Visit Website &#x2192;</a></p>
</div>
</div>
</header>
<div id="content">
<main>
<h2>📄 Recent Posts</h2>
<xsl:for-each select="/rss/channel/item">
<article>
<h3><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute><xsl:value-of select="title"/></a></h3>
<footer>Published: <time><xsl:value-of select="pubDate" /></time></footer>
</article>
</xsl:for-each>
</main>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
---
title: Manifest
layout: manifest
outputs:
- "json"
norss: true
nosearch: true
---

View File

@ -1,10 +0,0 @@
---
title: Search
layout: search
outputs:
- "html"
- "json"
norss: true
nosearch: true
comments: false
---

View File

@ -1,22 +0,0 @@
default: dark # light
auto_switch: false # set to true to respect the user preference
dark:
bg: '#000000' # main site background
hl_bg: '#000000' # card and circle navigation background color for paper card mode
fg: 'white' # font color
dim_fg: '#bababa' # will be used for secondary information like dates and tags
stroke: '#4f4f4f' # stroke/border color used mostly in the icon menu tooltip
accent: '#bdbdff' # pervasive accent color
sidebar:
bg: '#34363b' # sidebar background
fg: 'white' # sidebar font color
light:
bg: '#f5f5f5'
hl_bg: '#e6e6e6'
fg: '#262625'
dim_fg: '#40403e'
stroke: '#575754'
accent: '#db5793'
sidebar:
bg: '#e6e6e6'
fg: '#121211'

View File

@ -1,21 +0,0 @@
email: "&#xf6ed;"
facebook: "&#xf09a;"
github: "&#xf09b;"
gitlab: "&#xf296;"
gnome: "&#xf7ab;"
instagram: "&#xf16d;"
linkedin: "&#xf0e1;"
mastodon: "<svg class='pseudofont' xmlns:svg='http://www.w3.org/2000/svg' width='16' height='16' viewbox='0 0 16 16'><path d='M 7.4779094,-1.598624e-6 C 5.5602384,0.0156984 3.7155894,0.2233384 2.6405814,0.7170384 c 0,0 -2.13206093,0.9537 -2.13206093,4.20766 0,0.74512 -0.01448,1.63603 0.0091,2.58084 0.07742,3.1821946 0.58336693,6.3183886 3.52553593,7.0971276 1.356568,0.359063 2.521335,0.434289 3.45936,0.382729 1.701085,-0.09431 2.6560206,-0.607063 2.6560206,-0.607063 l -0.05611,-1.234252 c 0,0 -1.2156316,0.383272 -2.5808476,0.33656 -1.352609,-0.04639 -2.780561,-0.145832 -2.999328,-1.80651 -0.0202,-0.145872 -0.03031,-0.301902 -0.03031,-0.465714 0,-10e-7 1.327834,0.324572 3.010574,0.40167 1.028943,0.0472 1.993827,-0.06028 2.9738766,-0.177218 1.879445,-0.224425 3.515901,-1.382448 3.721577,-2.4405646 0.32407,-1.666815 0.297376,-4.067605 0.297376,-4.067605 0,-3.25396 -2.131943,-4.20766 -2.131943,-4.20766 C 11.288476,0.2233384 9.4426784,0.0156784 7.5250084,-1.598624e-6 Z M 5.3076104,2.5424984 c 0.798781,0 1.403595,0.30701 1.803551,0.92113 l 0.388886,0.65181 0.388884,-0.65181 c 0.399875,-0.61412 1.00469,-0.92113 1.803551,-0.92113 0.6903266,0 1.2465526,0.24267 1.6713186,0.71609 0.411755,0.47342 0.61677,1.11337 0.61677,1.91862 v 3.939988 h -1.560986 v -3.824218 c 0,-0.80613 -0.339166,-1.21531 -1.0176126,-1.21531 -0.750129,0 -1.126049,0.48533 -1.126049,1.44509 v 2.09324 h -1.551753 v -2.09324 c 0,-0.95976 -0.376039,-1.44509 -1.126168,-1.44509 -0.678446,0 -1.017613,0.40918 -1.017613,1.21531 v 3.824218 h -1.560985 v -3.939988 c 0,-0.80525 0.205053,-1.4452 0.616889,-1.91862 0.424685,-0.47342 0.980911,-0.71609 1.671317,-0.71609 z' /></svg>"
matrix: "<svg class='pseudofont' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'><path d='m0.61133 0v16h1.6498v-0.52679h-1.0762v-14.946h1.0762v-0.52679zm13.128 0v0.52679h1.0762v14.946h-1.0762v0.52679h1.6498v-16zm-6.8306 5.0527c-0.36785 0-0.69557 0.080576-0.98047 0.24219-0.28509 0.1618-0.52842 0.38949-0.73047 0.68359h-0.021484v-0.77148h-1.4512v5.7051h1.5371v-3.3105c-1e-7 -0.27957 0.039729-0.50668 0.11914-0.67969 0.079365-0.17278 0.17514-0.30442 0.28711-0.39648 0.11173-0.091827 0.22666-0.15439 0.3457-0.1875 0.11891-0.033206 0.21487-0.050781 0.28711-0.050781 0.24522 0 0.43037 0.042632 0.55664 0.12695 0.12617 0.084749 0.21736 0.19823 0.27148 0.33789 0.054214 0.1399 0.084431 0.29138 0.091797 0.45703 0.00694 0.16546 0.00977 0.33274 0.00977 0.50195v3.2012h1.5371v-3.1777c0-0.17658 0.013679-0.35257 0.039063-0.52539 0.025197-0.17301 0.074658-0.3266 0.15039-0.46289 0.075685-0.13596 0.18087-0.24728 0.31445-0.33203 0.13349-0.08432 0.309-0.12695 0.52539-0.12695 0.21639 0 0.38741 0.038028 0.51367 0.11133 0.12608 0.073632 0.22214 0.17384 0.28711 0.29883 0.06493 0.12527 0.1026 0.27229 0.11719 0.44141 0.01445 0.16935 0.02344 0.34786 0.02344 0.53906v3.2344h1.5371v-3.8184c0-0.36802-0.05142-0.68189-0.15234-0.94336-0.10121-0.26099-0.24168-0.47277-0.42188-0.63477-0.18039-0.16185-0.39609-0.27993-0.64844-0.35352-0.25272-0.073585-0.52842-0.10938-0.82422-0.10938-0.38965 0-0.72682 0.093949-1.0117 0.28516-0.28509 0.1913-0.50997 0.41395-0.67578 0.66406-0.15151-0.35325-0.3738-0.60033-0.66602-0.74023-0.29212-0.13966-0.61338-0.20898-0.9668-0.20898z' /></svg>"
peertube: "<svg class='pseudofont' width='16' height='16' version='1.1' viewBox='2799 -911 16 16' xmlns='http://www.w3.org/2000/svg'><path d='m2801-911v8l5.9998-3.9996zm5.9998 4.0004v7.9993l5.9998-3.9996-5.9998-4.0004zm-5.9998 3.9996v8l5.9998-3.9996z'/></svg>"
phone: "&#xf095;"
pleroma: "<svg class='pseudofont' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'><path d='m4.2344 3.1826e-6a1.2455 1.2455 0 0 0-1.2404 1.2455 1.2455 1.2455 0 0 0 0 0.00515v14.749h3.976v-16h-2.7305a1.2455 1.2455 0 0 0-0.00515 0zm4.7477 0v8h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.00515v-6.7493zm0 12.024v3.976h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.0051v-2.7254z' /></svg>"
rss: "&#xf09e;"
steam: "&#xf1b6;"
telegram: "&#xf2c6;"
twitter: "&#xf099;"
xmpp: "&#xfcfd;"
youtube: "&#xf16a;"
discord: "&#xfb6e;"
soundcloud: "&#xf1be;"

View File

@ -1,18 +0,0 @@
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 path/to/icon.svg"
exit 1
fi
FNAME=$1
if [ ! -f "$FNAME" ]; then
echo "Error: file $FNAME doesn't exist"
exit 1
fi
DESTDIR="$(dirname "$FNAME")"
convert -density 1200 -background none -resize 32x32 "$FNAME" "$DESTDIR/favicon.ico"
convert -density 1200 -background none -resize 32x32 "$FNAME" "$DESTDIR/favicon.png"
convert -density 1200 -background none -resize 180x180 "$FNAME" "$DESTDIR/apple-touch-icon.png"
convert -density 1200 -background none -resize 192x192 "$FNAME" "$DESTDIR/android-chrome-192x192.png"
convert -density 1200 -background none -resize 512x512 "$FNAME" "$DESTDIR/android-chrome-512x512.png"

View File

@ -1,59 +0,0 @@
[404message]
other = "This is not the page you were looking for"
[searchbarTxt]
other = "Search"
[tags]
other = "Tags"
[date]
other = "Date"
[continueReading]
other = "Continue reading"
[previousPage]
other = "Previous page"
[nextPage]
other = "Next page"
[shareOnTheFediverse]
other = "Share on the Fediverse"
[enterFediverseInstanceAddress]
other = "Enter your instance's address"
[fediverseInstanceExample]
other = "Eg. mastodon.social"
[cancel]
other = "Cancel"
[share]
other = "Share"
[themeCopyrightNotice]
other = ""
[home]
other = "Home"
[posts]
other = "Posts"
[search]
other = "Search"
[tagsColumn]
other = "Tags:"
[tagColumn]
other = "Tag:"
[morePostsLikeThis]
other = "More posts like this"
[noResultsFound]
other = "No results found"

View File

@ -1,59 +0,0 @@
[404message]
other = "Esta no es la página que está buscando"
[searchbarTxt]
other = "Buscar"
[tags]
other = "Etiquetas"
[date]
other = "Fecha"
[continueReading]
other = "Continuar leyendo"
[previousPage]
other = "Página anterior"
[nextPage]
other = "Página siguiente"
[shareOnTheFediverse]
other = "Compartir en el Fediverse"
[enterFediverseInstanceAddress]
other = "Ingrese la dirección de su instancia"
[fediverseInstanceExample]
other = "Por ej.: mastodon.social"
[cancel]
other = "Cancelar"
[share]
other = "Compartir"
[themeCopyrightNotice]
other = ""
[home]
other = "Principal"
[posts]
other = "Posts"
[search]
other = "Buscar"
[tagsColumn]
other = "Etiquetas:"
[tagColumn]
other = "Etiqueta:"
[morePostsLikeThis]
other = "Más posts como este"
[noResultsFound]
other = "No se encontraron resultados"

View File

@ -1,59 +0,0 @@
[404message]
other = "Ceci n'est pas la page que vous cherchez..."
[searchbarTxt]
other = "Chercher"
[tags]
other = "Tags"
[date]
other = "Date"
[continueReading]
other = "Continuer la lecture"
[previousPage]
other = "Page précédente"
[nextPage]
other = "Page suivante"
[shareOnTheFediverse]
other = "Partager sur Fediverse"
[enterFediverseInstanceAddress]
other = "Saisissez votre adresse d'instance"
[fediverseInstanceExample]
other = "Eg. mastodon.social"
[cancel]
other = "Annuler"
[share]
other = "Partager"
[themeCopyrightNotice]
other = ""
[home]
other = "Accueil"
[posts]
other = "Posts"
[search]
other = "Rechercher"
[tagsColumn]
other = "Tags:"
[tagColumn]
other = "Tag:"
[morePostsLikeThis]
other = "Plus de posts comme celui-ci"
[noResultsFound]
other = "Aucun résultat trouvé"

View File

@ -1,59 +0,0 @@
[404message]
other = "Questa non è la pagina che stavi cercando"
[searchbarTxt]
other = "Cerca"
[tags]
other = "Tag"
[date]
other = "Data"
[continueReading]
other = "Continua a leggere"
[previousPage]
other = "Pagina precedente"
[nextPage]
other = "Pagina successiva"
[shareOnTheFediverse]
other = "Condividi sul Fediverse"
[enterFediverseInstanceAddress]
other = "Inserisci l'indirizzo della tua istanza"
[fediverseInstanceExample]
other = "Es. mastodon.social"
[cancel]
other = "Annulla"
[share]
other = "Condividi"
[themeCopyrightNotice]
other = ""
[home]
other = "Home"
[posts]
other = "Post"
[search]
other = "Cerca"
[tagsColumn]
other = "Tag:"
[tagColumn]
other = "Tag:"
[morePostsLikeThis]
other = "Altri post come questo"
[noResultsFound]
other = "Nessun risultato trovato"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

@ -1,7 +0,0 @@
{{ define "main" }}
<article>
<h1>
{{ i18n "404message" }}
</h1>
</article>
{{ end }}

View File

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html class="{{ if .IsHome }}home{{ end }}" lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
{{- partial "build_assets.html" . -}}
<body>
<div id="baseContainer">
{{- partial "header.html" . -}}
<div id="contentContainer">
<div id="content">
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</div>
</div>
</div>
{{- partial "plausible.html" . -}}
{{- partial "umami.html" . -}}
{{- partial "inject/body.html" . -}}
</body>
</html>

View File

@ -1 +0,0 @@
{{- block "main" . }}{{- end }}

View File

@ -1,8 +0,0 @@
{{ define "main" }}
{{ if in (site.Params.extraContentDirs | default (slice)) .Section }}
<h1>{{ .Section | humanize }}</h1>
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" .Pages) -}}
{{ else }}
{{- partial "simple_posts_list.html" . -}}
{{ end }}
{{ end }}

View File

@ -1,37 +0,0 @@
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": "{{ .Site.Title }}",
"short_name": "{{ .Site.Title }}",
"start_url": "/",
"display": "standalone",
{{ $bg := (.Site.Data.colors.dark.bg | default "#242629") }}
{{ $accent := (.Site.Data.colors.dark.accent | default "#db5793") }}
{{ if eq .Site.Data.colors.default "light" }}
{{ $bg = (.Site.Data.colors.light.bg | default "#f5f5f5") }}
{{ $accent = (.Site.Data.colors.light.accent | default "#db5793") }}
{{ end }}
"background_color": "{{ $bg }}",
"theme_color": "{{ $accent }}"
{{ if .Site.Params.description }}
,
"description": "{{ .Site.Params.description }}"
{{ end }}
{{ if .Site.Params.icon512 }}
,
"icons": [
{
"src": "{{ .Site.Params.icon512 }}",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "{{ .Site.Params.icon512 }}",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
}
]
{{ end }}
}

View File

@ -1,45 +0,0 @@
{{ define "main" }}
<noscript>
You need to enable JavaScript to be able to search.
</noscript>
{{- partial "searchbar.html" . -}}
<div class="postlist {{ if .Site.Params.gridView }}gridView{{ end }}" id="postlist">
</div>
{{- partial "js_paginator.html" . -}}
<script>
const noResFoundStr = {{ i18n "noResultsFound" }}
function matchTags(page, term) {
for (let tag of page.tags) {
if (tag.includes(term)) return true;
}
return false;
}
function performSearch(term) {
document.getElementById('postlist').innerHTML = '';
term = term.toLowerCase();
fetch('/search/index.json').then(res => res.json())
.then(res => {
let articles = res.pages.filter(page => (
page.title.toLowerCase().includes(term) ||
matchTags(page, term) ||
page.text.includes(term)
));
if (articles.length > 0) renderArticles(articles);
else document.getElementById('postlist').innerHTML = `
<h3>${noResFoundStr}</h3>
`;
});
}
var url = location.href;
var baseUrl = url.split('?')[0];
var searchbar = document.getElementById('searchbar');
if (url.includes('?')) {
var urlParams = new URLSearchParams(url.split('?')[1]);
if (urlParams.has('q')) {
let searchTerm = urlParams.get('q');
searchbar.value = searchTerm;
performSearch(searchTerm);
}
}
</script>
{{ end }}

View File

@ -1,27 +0,0 @@
{{ define "main" }}
{
{{ $mscratch := newScratch }}
{{ $mscratch.Add "articles" slice }}
{{ $pages := where .Site.RegularPages "Params.nosearch" "!=" "true" }}
{{ range $pages }}
{{ $image := "" }}
{{ if .Params.Image }}
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
{{ $image = .Params.Image }}
{{ else }}
{{ $image = print .Permalink "/" .Params.Image }}
{{ end }}
{{ end }}
{{ $mscratch.Add "articles" (dict
"title" .Title
"date" (.Date.Format "2006-01-02")
"tags" (sort (or .Params.tags slice))
"summary" (or .Params.description .Summary)
"text" (lower .Plain)
"link" .Permalink
"image" $image
"imageAlt" (or .Params.Alt "")) }}
{{ end }}
"pages": {{ $mscratch.Get "articles" | jsonify }}
}
{{ end }}

View File

@ -1,3 +0,0 @@
{{ define "main" }}
{{- partial "single_post.html" . -}}
{{ end }}

View File

@ -1,15 +0,0 @@
{{ define "main" }}
{{/* get all the pages that are regular posts and not pages */}}
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
{{ $allPostsList := where (where site.RegularPages "Section" "in" $postsDir) "Section" "!=" "" }}
{{- partial "showcase.html" . -}}
{{ if and .Site.Params.showSinglePageAsHome (ne .Site.Params.homeSinglePage "") }}
{{ with .Site.GetPage .Site.Params.homeSinglePage }}
{{- partial "single_post.html" . -}}
{{ end }}
{{ else }}
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" $allPostsList) -}}
{{ end }}
{{ end }}

View File

@ -1,38 +0,0 @@
{{ define "main" }}
{
{{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }}
{{ $allPostsList := where .Site.RegularPages "Section" "in" $postsDir }}
{{ $featuredPostsList := slice }}
{{ $postsList := $allPostsList }}
{{ if .Site.Params.enableFeatured | default false }}
{{ $featuredPostsList = where $allPostsList "Params.featured" true }}
{{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }}
{{ end }}
{{ $mscratch := newScratch }}
{{ $mscratch.Add "articles" slice }}
{{ range (.Paginate $postsList).Pages }}
{{ $image := "" }}
{{ if .Params.Image }}
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
{{ $image = .Params.Image }}
{{ else }}
{{ $image = print .Permalink "/" .Params.Image }}
{{ end }}
{{ end }}
{{ $mscratch.Add "articles" (dict
"title" .Title
"date" (.Date.Format "2006-01-02")
"tags" (sort (or .Params.tags slice))
"summary" (or .Params.description .Summary)
"link" .Permalink
"image" $image
"imageAlt" (or .Params.Alt "")) }}
{{ end }}
"articles": {{ $mscratch.Get "articles" | jsonify }},
"test": "{{range $postsList}}{{.Title}} {{end}}",
"page": "{{ .Paginator.PageNumber }}",
"next": {{ if .Paginator.HasNext }}
{{ .Paginator.Next.URL | absURL | jsonify }}
{{ else }}""{{ end }}
}
{{ end }}

View File

@ -1,46 +0,0 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
{{- printf "<?xml-stylesheet href=\"/feed_style.xsl\" type=\"text/xsl\"?>" | safeHTML -}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://www.rssboard.org/media-rss">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
<icon>{{ .Site.Params.Logo | default "/img/icon.svg" | absURL }}</icon>
{{ range $pages }}
{{ if not ( .Params.norss | default false) }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ printf "<![CDATA[" | safeHTML }}{{ .Content | safeHTML }}{{ printf "]]>" | safeHTML }}</description>
{{ if .Params.image }}
<media:thumbnail url="{{ .Params.image | absURL }}" />
{{ end }}
</item>
{{ end }}
{{ end }}
</channel>
</rss>

View File

@ -1,42 +0,0 @@
<article class="card postlistitem">
<div>
<h2>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h2>
<p class="date">
<span title='{{ i18n "date" }}'></span>
{{- partial "date.html" .Date -}}
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
| <!-- Pipe character as visual separator between date and tags-->
<span title='{{ i18n "tags" }}'></span>
{{ range sort .Params.tags }}
<a href="/tags/{{ . | urlize }}">#{{ . }}</a>
{{ end }}
{{ end }}
</p>
{{ if .Site.Params.imageInArticlePreview }}
{{ if .Params.Image }}
<a class="unstyledLink" href="{{ .Permalink }}">
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ else }}
<img src="{{ .Permalink }}/{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ end }}
</a>
{{ end }}
{{end}}
{{ if (site.Params.articleSummary | default true) }}
<div class="articlePreview">
<p>
{{ if .Params.description }}
{{ .Params.description }}
{{ else }}
{{.Summary }}
{{ end }}
</p>
<p><a href="{{ .Permalink }}">{{ i18n "continueReading" }} </a></p>
</div>
{{ end }}
</div>
<hr />
</article>

View File

@ -1,10 +0,0 @@
{{/*
This partial builds non-standard assets (like xsl files) with the template
engine. It is necessary to do it this way to reduce user friction and
ensure that the file is there.
*/}}
{{ if .IsHome }}
{{ $feed_style_xsl_template := resources.Get "feed_style.xsl" }}
{{ $feed_style_xsl := $feed_style_xsl_template | resources.ExecuteAsTemplate "feed_style.xsl" . }}
{{ $noop := $feed_style_xsl.Permalink }}
{{ end }}

View File

@ -1,15 +0,0 @@
{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }}
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
<div id="ficurinia-cactus-comments"></div>
<script>
initComments({
node: document.getElementById("ficurinia-cactus-comments"),
defaultHomeserverUrl: '{{ site.Params.cactusCommentsHomeserver | default "https://matrix.cactus.chat:8448" }}',
serverName: '{{ site.Params.cactusCommentsServerName | default "cactus.chat" }}',
siteName: "{{ site.Params.cactusCommentsSiteName }}",
commentSectionId: "{{ .File.UniqueID }}"
})
</script>
{{ end }}

View File

@ -1,8 +0,0 @@
{{ if and .Site.Params.commento (.Params.comments | default true) }}
<script
defer
src="{{ .Site.Params.commento }}"
data-no-fonts="true"
></script>
<div id="commento"></div>
{{ end }}

View File

@ -1,5 +0,0 @@
{{ if site.Params.dateFormat }}
{{ .Format site.Params.dateFormat }}
{{ else }}
{{ .Format "2006-01-02" }}
{{ end }}

View File

@ -1,37 +0,0 @@
<div class="featured postlist gridView">
{{ range . }}
{{ $image := "" }}
{{ if .Params.Image }}
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
{{ $image = .Params.Image }}
{{ else }}
{{ $image = print .Permalink "/" .Params.Image }}
{{ end }}
{{ end }}
<a class="featuredCardLink" href="{{ .Permalink }}">
<article class="featuredCard"
style="
background-image: linear-gradient(to bottom,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.1) 45%,
rgba(0, 0, 0, 0.7) 100%
), url('{{ $image }}');
">
<div class="contentArea">
<h2>{{ .Title }}</h2>
<p class="date">
<span title='{{ i18n "date" }}'></span>
{{- partial "date.html" .Date -}}
{{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }}
<br />
<span title='{{ i18n "tags" }}'></span>
{{ range sort .Params.tags }}
#{{ . }}
{{ end }}
{{ end }}
</p>
</div>
</article>
</a>
{{ end }}
</div>

View File

@ -1,2 +0,0 @@
<footer>
</footer>

View File

@ -1,12 +0,0 @@
{{ if (and (.Site.Params.enableFooterColumns | default false) .Site.Data.footer_columns) }}
<div class="footerColumns">
{{ range .Site.Data.footer_columns }}
<ul class="notlist">
<li><strong>{{ .title }}</strong></li>
{{ range .links }}
<li><a target="_blank" href="{{ .link }}">{{ .title }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
{{ end }}

View File

@ -1,44 +0,0 @@
<head>
{{ if .Site.Params.forceRedirect }}
<script>
if (location.host != new URL("{{ .Site.BaseURL }}").host) location.href = "{{ .Site.BaseURL }}"
</script>
{{ end }}
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ end }}
{{- partial "head_icons.html" . -}}
<title>
{{ if and (.Title) (ne .Title .Site.Title) }}
{{ .Title }} &ndash;
{{ end }}
{{ .Site.Title | default "Ficurinia" }}
</title>
{{/*
how to update these hashes:
https://gitlab.com/gabmus/hugo-ficurinia/-/merge_requests/5
*/}}
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet" integrity="sha512-lydow8GLOLlYNOtHlksNCmGWWCBsbIEtikXpHzfWqx78HLlyQZHOzyLwPpKol4Th6aCwLUXOfODVYgwrd3nwKQ=="/>
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet" integrity="sha512-tJxlgL6v1Y7kFf+qB8SloaAMKnOAw6WouknxXtIjkBux9Y/9aX81EUWOJO8c/3l98DmjG8brr4to7zaez606Fg=="/>
{{ if and site.Params.cactusCommentsSiteName (.Params.comments | default true) }}
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
{{ end }}
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
<link type="text/css" rel="stylesheet" href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
{{- partial "inject/head.html" . -}}
{{- partial "head_meta_seo.html" . -}}
{{- partial "head_meta_opengraph.html" . -}}
{{- partial "head_meta_twitter.html" . -}}
<link rel="manifest" href="/manifest/index.json" />
</head>

View File

@ -1,20 +0,0 @@
<link
rel="icon"
href='{{ .Site.Params.favicon | default "/favicon.png" }}'
/>
<link
rel="shortcut icon"
href='{{ .Site.Params.faviconIco | default "/favicon.ico" }}'
type="image/x-icon"
/>
<link
rel="apple-touch-icon"
href='{{ .Site.Params.appletouch | default "/apple-touch-icon.png" }}'
/>
{{ if .Site.Params.svgicon }}
<link
rel="icon"
href='{{ .Site.Params.svgicon | default "/logo.svg" }}'
type="image/svg+xml"
/>
{{ end }}

View File

@ -1,42 +0,0 @@
<meta property="og:site_name"
content='{{ .Site.Title | default "Ficurinia" }}' />
{{ if .IsPage }}
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:type" content="article" />
<meta
property="article:author" content="{{ .Site.Params.Author }}" />
<meta
property="article:published_time"
content='{{ .Date.Format "2006-01-02T15:04:05Z-0700" }}' />
{{ if .Params.tags }}
{{ range sort .Params.tags }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
{{ $image := .Site.Params.icon512 | default "/img/icon.svg" }}
{{ if .Params.Image }}
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
{{ $image = .Params.Image }}
{{ else }}
{{ $image = print .Permalink "/" .Params.Image }}
{{ end }}
{{ end }}
<meta property="og:image"
content="{{ $image | absURL }}" />
{{ if .Params.description }}
<meta property="og:description" content="{{ .Params.description }}" />
{{ else }}
<meta property="og:description" content="{{ substr .Summary 0 160 }}" />
{{ end }}
{{ else }}
<meta property="og:title"
content='{{ .Site.Title | default "Ficurinia" }}' />
{{ if .Site.Params.description }}
<meta property="og:description" content="{{ .Site.Params.description }}" />
{{ end }}
<meta property="og:type" content="blog" />
<meta property="og:image"
content='{{ .Site.Params.icon512 | default "/img/icon.svg" | absURL }}' />
{{ end }}

View File

@ -1,15 +0,0 @@
<meta name="author" content="{{ .Site.Params.Author }}" />
{{ if .IsPage }}
{{ if .Params.tags }}
<meta name="keywords" content='{{ delimit (sort .Params.tags) ", "}}' />
{{ end }}
{{ if .Params.description }}
<meta name="description" content="{{ .Params.description }}" />
{{ else }}
<meta name="description" content="{{ substr .Summary 20 }}" />
{{ end }}
{{ else }}
{{ if .Site.Params.description }}
<meta name="description" content="{{ .Site.Params.description }}" />
{{ end }}
{{ end }}

View File

@ -1,33 +0,0 @@
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain"
content='{{ trim (trim .Site.BaseURL "http://") "https://" }}'
/>
<meta property="twitter:url" content="{{ .Permalink | absURL }}" />
{{ if .IsPage }}
<meta name="twitter:title" content="{{ .Title }}" />
{{ $image := .Site.Params.icon512 | default "/img/icon.svg" }}
{{ if .Params.Image }}
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
{{ $image = .Params.Image }}
{{ else }}
{{ $image = print .Permalink "/" .Params.Image }}
{{ end }}
{{ end }}
<meta name="twitter:image"
content="{{ $image | absURL }}" />
{{ if .Params.description }}
<meta name="twitter:description" content="{{ .Params.description }}" />
{{ else }}
<meta name="twitter:description" content="{{ substr .Summary 0 160 }}" />
{{ end }}
{{ else }}
<meta name="twitter:title"
content='{{ .Site.Title | default "Ficurinia" }}' />
{{ if .Site.Params.description }}
<meta name="twitter:description" content="{{ .Site.Params.description }}" />
{{ end }}
<meta name="twitter:image"
content='{{ .Site.Params.icon512 | default "/img/icon.svg" | absURL }}' />
{{ end }}

View File

@ -1,63 +0,0 @@
<header class="{{ if .IsHome }}jumbotronContainer{{ end }}">
{{- partial "inject/header-before.html" . -}}
<div class="titleAndSearchContainer">
<div id="titleContainer">
{{ if not (.Site.Params.logoRightOfTitle | default false) }}
<a class="unstyledLink" href="/">
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' alt='{{ .Site.Params.LogoAltText | default "Logo" }}'/>
</a>
{{ end }}
<div class="rightOfLogo">
<div class="titleAndHamburger">
<h1>
<a class="unstyledLink" href="/">{{ .Site.Title | default "Ficurinia" }}</a>
{{ if .Site.Params.logoRightOfTitle | default false }}
<img src='{{ .Site.Params.Logo | default "/logo.svg" }}' alt='{{ .Site.Params.LogoAltText | default "Logo" }}'/>
{{ end }}
</h1>
{{ if (.Site.Params.mobileHamburgerNav | default false) }}
<label id="hamburger-menu" for="main-nav-toggler">
&#xf85b;
</label>
{{ end }}
</div>
<div id="wide_nav">
{{- partial "header_navigation.html" . -}}
</div>
</div>
</div>
{{ if and (.Site.Params.searchbarEverywhere | default true) (and (.Site.Params.enableSearch | default true) (not (eq .Title "Search"))) }}
{{- partial "searchbar.html" . -}}
{{ end }}
</div>
<div id="links">
{{ if .Site.Params.showRss | default true }}
{{- partial "iconlink" (dict "Identifier" "rss" "Name" "RSS" "URL" "/index.xml") -}}
{{ end }}
{{ range .Site.Params.links }}
{{- partial "nerdlink" . -}}
{{ end }}
{{ range .Site.Menus.icons }}
{{- partial "iconlink" . -}}
{{ end }}
</div>
{{ if and
(.Site.Params.enableSidebarLayout | default false)
(or
(not (.Site.Params.enableJumbotron | default false))
(not .IsHome)
)
}}
<div id="sidebar_nav">
{{- partial "header_navigation.html" . -}}
</div>
{{ if and .IsPage .Params.toc }}
<div class="sidebarToc">
<hr />
{{ .TableOfContents }}
</div>
{{ end }}
{{ end }}
{{- partial "inject/header-after.html" . -}}
{{- partial "jumbotron.html" . -}}
</header>

View File

@ -1,30 +0,0 @@
<nav>
{{ if (.Site.Params.mobileHamburgerNav | default false) }}
<input type="checkbox" id="main-nav-toggler" />
{{ end }}
<ul id="main-nav">
<li><a href="/">{{ i18n "home" }}</a></li>
{{ if (.Site.Params.showPostsLink | default true) }}
<li><a href="/posts">{{ i18n "posts" }}</a></li>
{{ end }}
{{ range site.Params.extraContentDirs }}
<li><a href="/{{ . }}">{{ . | humanize }}</a></li>
{{ end }}
{{ $pagesDir := .Site.Params.Pages | default (slice "pages") }}
{{ $pagesList := where .Site.RegularPages "Section" "in" $pagesDir }}
{{ range $pagesList }}
<li><a href="{{ .Permalink }}">
{{ or .Params.Button .Title }}
</a></li>
{{ end }}
{{ range .Site.Menus.main }}
<li><a href="{{ .URL | safeURL }}">{{ .Name }}</a></li>
{{ end }}
{{ if (.Site.Params.showTags | default true) }}
<li><a href="/tags">{{ i18n "tags" }}</a></li>
{{ end }}
{{ if and (.Site.Params.searchMenuLink | default false) (.Site.Params.enableSearch | default true) }}
<li><a href="/search">{{ i18n "search" }}</a></li>
{{ end }}
</ul>
</nav>

View File

@ -1,23 +0,0 @@
{{ $allPostsList := .AllPostsList }}
{{ $postsList := $allPostsList }}
{{ $featuredPostsList := slice }}
{{ $pagination := slice }}
{{ if site.Params.enableFeatured | default false }}
{{ $featuredPostsList = where $allPostsList "Params.featured" true }}
{{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }}
{{ $pagination = (.Ctx.Paginate $postsList).Pages }}
{{ if eq .Ctx.Paginator.PageNumber 1 }}
{{- partial "featured_articles.html" $featuredPostsList -}}
{{ end }}
{{ else }}
{{ $pagination = (.Ctx.Paginate $postsList).Pages }}
{{ end }}
{{/* pagination */}}
<div class="postlist {{ if site.Params.gridView }}gridView{{ end }}" id="postlist">
{{ range $pagination }}
{{- partial "article_card.html" . -}}
{{ end }}
</div>
<div id="getNextBtnContainer"></div>
{{- partial "paginator.html" .Ctx -}}

View File

@ -1,19 +0,0 @@
<a
{{ if eq (lower .Identifier) "mastodon" }}
rel="me"
{{ else }}
rel="noreferrer"
{{ end }}
target="_blank"
class="nerdlink"
href="{{ .URL | safeURL }}">
{{ $icon := index site.Data.supported_icons (lower .Identifier) | safeHTML }}
{{ if $icon }}
{{ $icon | safeHTML }}
{{ else }}
{{ .Name }}
{{ end }}
<span>
{{ .Name }}
</span>
</a>

View File

@ -1 +0,0 @@
<!-- This code will be injected before closing the body tag -->

View File

@ -1 +0,0 @@
<!-- This code will be injected after a post or page content -->

View File

@ -1 +0,0 @@
<!-- This code will be injected before a post or page content -->

View File

@ -1 +0,0 @@
<!-- This code will be injected at the beginning of the footer -->

View File

@ -1 +0,0 @@
<!-- This code will be injected before closing the head tag -->

View File

@ -1 +0,0 @@
<!-- This code will be injected before closing the header -->

View File

@ -1 +0,0 @@
<!-- This code will be injected just after opening the header -->

View File

@ -1,64 +0,0 @@
<script>
const tagsStr = '{{ i18n "tags" | safeJS }}'
function renderTags(tags) {
if (tags.length <= 0) return '';
let res = `| <span title=''></span>`;
for (let tag of tags) {
// regular space
res += `<a href="/tags/${tag}">#${tag}</a>&#32;`;
}
return res;
}
function renderImage(image, link, alt) {
if (!image) return '';
return `<a href="${link}"><img src="${image}" alt="${alt}" /></a>`;
}
function renderSingleArticle(article) {
{{ if (.Site.Params.tagsInArticlePreview | default true) }}
const tags = renderTags(article.tags)
{{ else }}
const tags = ''
{{ end }}
{{ if .Site.Params.imageInArticlePreview }}
const img = renderImage(article.image, article.link, article.imageAlt)
{{ else }}
const img = ''
{{ end }}
{{ if (site.Params.articleSummary | default true) }}
const continueReadingStr = '{{ i18n "continueReading" | safeJS }}'
const summ = `<div class="articlePreview">
<p>${article.summary}</p>
<p><a href="${article.link}">${continueReadingStr} </a></p>
</div>`
{{ else }}
const summ = ''
{{ end }}
const dateStr = '{{ i18n "date" | safeJS }}'
return `
<article class="card postlistitem">
<div>
<h2>
<a href="${article.link}">${article.title}</a>
</h2>
<p class="date">
<span title='${dateStr}'></span>
${article.date}
${tags}
</p>
${img}
${summ}
</div>
<hr />
</article>
`;
}
function renderArticles(articles) {
let rendered = articles.map(a => renderSingleArticle(a)).join('\n');
document.getElementById('postlist').innerHTML += rendered;
}
</script>

View File

@ -1,89 +0,0 @@
{{ if and .IsHome (and (.Site.Params.enableJumbotron | default false) .Site.Data.jumbotron) }}
{{
$jumbo_fullscreen := (or
(.Site.Data.jumbotron.fullscreen | default false)
(.Site.Data.jumbotron.backgroundVideo)
)
}}
{{ if .Site.Data.jumbotron.backgroundVideo }}
<div class="video_container">
<video
class="jumbotron_video"
id="jumbotron_video"
src="{{ .Site.Data.jumbotron.backgroundVideo }}"
playsinline
autoplay mute loop>
{{ if .Site.Data.jumbotron.backgroundVideoMp4 }}
<source src="{{ .Site.Data.jumbotron.backgroundVideoMp4 }}" type="video/mp4">
{{ end }}
{{ if .Site.Data.jumbotron.backgroundVideoWebm }}
<source src="{{ .Site.Data.jumbotron.backgroundVideoWebm }}" type="video/webm">
{{ end }}
</video>
</div>
{{ end }}
<div class="jumbotron">
{{ if .Site.Data.jumbotron.image }}
<img src="{{ .Site.Data.jumbotron.image }}" />
{{ end }}
<div class="main_box">
<h2 class="
{{ if (.Site.Data.jumbotron.hugeTitle | default false) }}
huge
{{ end }}
">{{ .Site.Data.jumbotron.title }}</h2>
<h3>{{ .Site.Data.jumbotron.subtitle }}</h3>
{{ if .Site.Data.jumbotron.backgroundVideo }}
<ul id="play_button_container" style="display: none">
<li>
<a title="Play" style="border-radius: 100%; width: 32px; height: 32px; display: flex; justify-content: center; align-items: center;" class="shareBtn" onclick="playvideo();"></a>
</li>
</ul>
<script>
var jumbotron_video = document.getElementById('jumbotron_video');
var play_button_container = document.getElementById('play_button_container');
window.onload = function() {
setTimeout(function() {
if (jumbotron_video.paused) {
play_button_container.style.display = 'block';
}
}, 1000);
};
function playvideo() {
jumbotron_video.play();
play_button_container.style.display = 'none';
}
</script>
{{ end }}
{{ if .Site.Data.jumbotron.links }}
<ul>
{{ range .Site.Data.jumbotron.links }}
<li>
<a class="{{ if .huge }}huge{{ end }}" href="{{ .link | safeURL }}">
{{ .title }}
</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
{{ if (
and
$jumbo_fullscreen
(.Site.Data.jumbotron.downArrow | default false)
) }}
<div class="arrow" onclick="jumpdown();">
<svg version="1.1" viewBox="0 0 33.867 33.867" xmlns="http://www.w3.org/2000/svg">
<path transform="scale(.26459)" d="m16 34.346v8c0 2.3545 1.0067 4.4663 2.6152 5.9277l45.385 45.385 45.385-45.385c1.6086-1.4614 2.6152-3.5732 2.6152-5.9277v-8h-8c-2.335 0-4.4287 0.99084-5.8887 2.5762l-0.037109 0.039063-34.074 34.074-34.074-34.074c-0.012103-0.013323-0.024917-0.025824-0.037109-0.039063-1.4599-1.5853-3.5537-2.5762-5.8887-2.5762h-8z" />
</svg>
</div>
<script>
function jumpdown() {
window.scrollTo({
top: window.innerHeight, left: 0, behavior: 'smooth'
});
}
</script>
{{ end }}
{{ end }}

View File

@ -1,55 +0,0 @@
<!-- NOTE: this is deprecated in favor of iconlink -->
<a
target="_blank"
rel="noreferrer"
class="nerdlink"
href="{{ index . 1 }}">
{{ if eq (lower (index . 0)) "gitlab" }}
&#xf296;
{{ else if eq (lower (index . 0)) "gnome" }}
&#xf7ab;
{{ else if eq (lower (index . 0)) "youtube" }}
&#xf16a;
{{ else if eq (lower (index . 0)) "email" }}
&#xf6ed;
{{ else if eq (lower (index . 0)) "twitter" }}
&#xf099;
{{ else if eq (lower (index . 0)) "instagram" }}
&#xf16d;
{{ else if eq (lower (index . 0)) "facebook" }}
&#xf09a;
{{ else if eq (lower (index . 0)) "github" }}
&#xf09b;
{{ else if eq (lower (index . 0)) "linkedin" }}
&#xf0e1;
{{ else if eq (lower (index . 0)) "telegram" }}
&#xf2c6;
{{ else if eq (lower (index . 0)) "xmpp" }}
&#xfcfd;
{{ else if eq (lower (index . 0)) "pleroma" }}
<svg class="pseudofont" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="m4.2344 3.1826e-6a1.2455 1.2455 0 0 0-1.2404 1.2455 1.2455 1.2455 0 0 0 0 0.00515v14.749h3.976v-16h-2.7305a1.2455 1.2455 0 0 0-0.00515 0zm4.7477 0v8h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.00515v-6.7493zm0 12.024v3.976h2.7784a1.2455 1.2455 0 0 0 1.2455-1.2455 1.2455 1.2455 0 0 0 0-0.0051v-2.7254z" />
</svg>
{{ else if eq (lower (index . 0)) "peertube" }}
<svg class="pseudofont" width="16" height="16" version="1.1" viewBox="2799 -911 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="m2801-911v8l5.9998-3.9996zm5.9998 4.0004v7.9993l5.9998-3.9996-5.9998-4.0004zm-5.9998 3.9996v8l5.9998-3.9996z"/>
</svg>
{{ else if eq (lower (index . 0)) "matrix" }}
<svg class="pseudofont" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="m0.61133 0v16h1.6498v-0.52679h-1.0762v-14.946h1.0762v-0.52679zm13.128 0v0.52679h1.0762v14.946h-1.0762v0.52679h1.6498v-16zm-6.8306 5.0527c-0.36785 0-0.69557 0.080576-0.98047 0.24219-0.28509 0.1618-0.52842 0.38949-0.73047 0.68359h-0.021484v-0.77148h-1.4512v5.7051h1.5371v-3.3105c-1e-7 -0.27957 0.039729-0.50668 0.11914-0.67969 0.079365-0.17278 0.17514-0.30442 0.28711-0.39648 0.11173-0.091827 0.22666-0.15439 0.3457-0.1875 0.11891-0.033206 0.21487-0.050781 0.28711-0.050781 0.24522 0 0.43037 0.042632 0.55664 0.12695 0.12617 0.084749 0.21736 0.19823 0.27148 0.33789 0.054214 0.1399 0.084431 0.29138 0.091797 0.45703 0.00694 0.16546 0.00977 0.33274 0.00977 0.50195v3.2012h1.5371v-3.1777c0-0.17658 0.013679-0.35257 0.039063-0.52539 0.025197-0.17301 0.074658-0.3266 0.15039-0.46289 0.075685-0.13596 0.18087-0.24728 0.31445-0.33203 0.13349-0.08432 0.309-0.12695 0.52539-0.12695 0.21639 0 0.38741 0.038028 0.51367 0.11133 0.12608 0.073632 0.22214 0.17384 0.28711 0.29883 0.06493 0.12527 0.1026 0.27229 0.11719 0.44141 0.01445 0.16935 0.02344 0.34786 0.02344 0.53906v3.2344h1.5371v-3.8184c0-0.36802-0.05142-0.68189-0.15234-0.94336-0.10121-0.26099-0.24168-0.47277-0.42188-0.63477-0.18039-0.16185-0.39609-0.27993-0.64844-0.35352-0.25272-0.073585-0.52842-0.10938-0.82422-0.10938-0.38965 0-0.72682 0.093949-1.0117 0.28516-0.28509 0.1913-0.50997 0.41395-0.67578 0.66406-0.15151-0.35325-0.3738-0.60033-0.66602-0.74023-0.29212-0.13966-0.61338-0.20898-0.9668-0.20898z" />
</svg>
{{ else if eq (lower (index . 0)) "mastodon" }}
<svg class="pseudofont" xmlns:svg="http://www.w3.org/2000/svg" width="16" height="16" viewbox="0 0 16 16">
<path d="M 7.4779094,-1.598624e-6 C 5.5602384,0.0156984 3.7155894,0.2233384 2.6405814,0.7170384 c 0,0 -2.13206093,0.9537 -2.13206093,4.20766 0,0.74512 -0.01448,1.63603 0.0091,2.58084 0.07742,3.1821946 0.58336693,6.3183886 3.52553593,7.0971276 1.356568,0.359063 2.521335,0.434289 3.45936,0.382729 1.701085,-0.09431 2.6560206,-0.607063 2.6560206,-0.607063 l -0.05611,-1.234252 c 0,0 -1.2156316,0.383272 -2.5808476,0.33656 -1.352609,-0.04639 -2.780561,-0.145832 -2.999328,-1.80651 -0.0202,-0.145872 -0.03031,-0.301902 -0.03031,-0.465714 0,-10e-7 1.327834,0.324572 3.010574,0.40167 1.028943,0.0472 1.993827,-0.06028 2.9738766,-0.177218 1.879445,-0.224425 3.515901,-1.382448 3.721577,-2.4405646 0.32407,-1.666815 0.297376,-4.067605 0.297376,-4.067605 0,-3.25396 -2.131943,-4.20766 -2.131943,-4.20766 C 11.288476,0.2233384 9.4426784,0.0156784 7.5250084,-1.598624e-6 Z M 5.3076104,2.5424984 c 0.798781,0 1.403595,0.30701 1.803551,0.92113 l 0.388886,0.65181 0.388884,-0.65181 c 0.399875,-0.61412 1.00469,-0.92113 1.803551,-0.92113 0.6903266,0 1.2465526,0.24267 1.6713186,0.71609 0.411755,0.47342 0.61677,1.11337 0.61677,1.91862 v 3.939988 h -1.560986 v -3.824218 c 0,-0.80613 -0.339166,-1.21531 -1.0176126,-1.21531 -0.750129,0 -1.126049,0.48533 -1.126049,1.44509 v 2.09324 h -1.551753 v -2.09324 c 0,-0.95976 -0.376039,-1.44509 -1.126168,-1.44509 -0.678446,0 -1.017613,0.40918 -1.017613,1.21531 v 3.824218 h -1.560985 v -3.939988 c 0,-0.80525 0.205053,-1.4452 0.616889,-1.91862 0.424685,-0.47342 0.980911,-0.71609 1.671317,-0.71609 z" />
</svg>
{{ else if eq (lower (index . 0)) "phone" }}
&#xf095;
{{ else if eq (lower (index . 0)) "rss" }}
&#xf09e;
{{ else }}
{{ index . 0 }}
{{ end }}
<span>
{{ index . 0 }}
</span>
</a>

View File

@ -1,66 +0,0 @@
{{ if .Site.Params.infiniteScrolling }}
{{- partial "js_paginator.html" . -}}
<script>
var nextPage = '/index.json';
function getNext(first=false) {
if (!nextPage) return;
fetch(nextPage).then(res => res.json())
.then(res => {
nextPage = res['next'];
if (first) {
document.getElementById('getNextBtnContainer').innerHTML += `
<div class="loadMoreButton {{ if eq .Site.Params.navtype "circles"}}buttonLike{{ end }}">
<a style="cursor: pointer" onclick="getNext();">
Load more articles
</a>
</div>
`;
return;
}
if (!nextPage) document.getElementById('getNextBtnContainer').innerHTML = '';
renderArticles(res['articles']);
});
}
getNext(true);
</script>
{{ end }}
{{ if .Site.Params.infiniteScrolling }}<noscript>{{ end }}
{{ if gt .Paginator.TotalPages 1 }}
{{ $navtype := .Site.Params.Navtype }}
<div id="pageNavigation" class='
{{ if eq $navtype "circles" }}
nav-circles
{{ end }}
'>
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}" title='{{ i18n "previousPage" }}'>
{{ if eq $navtype "circles" }}
{{ else }}
&lt;&lt;&lt;
{{ end }}
</a>
{{ end }}
{{ $currentPage := .Paginator.PageNumber }}
{{ range .Paginator.Pagers }}
{{ if ne .PageNumber $currentPage }}
<a href="{{ .URL }}">{{ .PageNumber }}</a>
{{ else }}
<span>
{{ if eq $navtype "circles" }}{{ .PageNumber }}
{{ else }}[{{ .PageNumber }}]{{ end }}
</span>
{{ end }}
{{ end }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}" title='{{ i18n "nextPage" }}'>
{{ if eq $navtype "circles" }}
{{ else }}
&gt;&gt;&gt;
{{ end }}
</a>
{{ end }}
</div>
{{ end }}
{{ if .Site.Params.infiniteScrolling }}</noscript>{{ end }}

View File

@ -1,10 +0,0 @@
{{ if .Site.Params.plausibleScriptUrl }}
{{ if .Site.Params.plausibleDomain }}
<script
async
defer
data-domain="{{ .Site.Params.plausibleDomain }}"
src="{{ .Site.Params.plausibleScriptUrl }}"
></script>
{{ end }}
{{ end }}

View File

@ -1,23 +0,0 @@
{{ if and (.Site.Params.enableRelatedArticles | default false) .Params.tags }}
{{ $postsList :=
where (
where (
where site.RegularPages "Params.tags" "!=" nil
) "Params.tags" "intersect" .Params.tags
) "Permalink" "ne" .Permalink
}}
{{ if $postsList }}
{{ if site.Params.randomRelated | default false }}
{{ $postsList = shuffle $postsList }}
{{ end }}
<div class="relatedArticlesContainer">
<hr />
<h2>{{ i18n "morePostsLikeThis" }}</h2>
<div class="postlist {{ if .Site.Params.gridView }}gridView{{ end }}">
{{ range first (.Site.Params.relatedArticlesNum | default 2) $postsList }}
{{- partial "article_card.html" . -}}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}

View File

@ -1,12 +0,0 @@
<div class="search">
<input id="searchbar" type="text" placeholder='{{ i18n "searchbarTxt" }}' />
<span class="nerdlink" onclick="newSearch();">&#xf002;</span>
</div>
<script>
function newSearch() {
let term = searchbar.value.trim();
if (!term) return;
location.href = `/search?q=${term}`;
}
searchbar.onkeyup = (ev) => {if (ev.keyCode == 13) newSearch()};
</script>

View File

@ -1,45 +0,0 @@
{{ if site.Params.enableShareOnFediverse | default false }}
<a style="margin-bottom: 24px; display: inline-block;" class="shareBtn" onclick="openFediInstanceDialog();">
{{ i18n "shareOnTheFediverse" }}
</a>
<div id="fediInstanceDialog">
<div class="bg" onclick="closeFediInstanceDialog();"></div>
<div class="dialog">
<h2>{{ i18n "enterFediverseInstanceAddress" }}</h2>
<input id="fediInstanceInput" placeholder='{{ i18n "fediverseInstanceExample" }}' type="text" />
<div class="buttons">
<a class="shareBtn" onclick="closeFediInstanceDialog();">{{ i18n "cancel" }}</a>
<a class="shareBtn" onclick="shareOnFedi();">{{ i18n "share" }}</a>
</div>
</div>
</div>
<script>
var articleTitle = '{{ .Title }}';
var articleLink = '{{ .Permalink }}';
var fediInstanceDialog = document.getElementById('fediInstanceDialog');
var fediInstanceInput = document.getElementById('fediInstanceInput');
function openFediInstanceDialog() {
fediInstanceDialog.classList.add('open');
}
function closeFediInstanceDialog() {
fediInstanceDialog.classList.remove('open');
}
function fixURL(url) {
if (url.substr(0, 8) == 'https://') return url;
if (url.substr(0, 7) == 'http://') return url;
return 'https://' + url;
}
function shareOnFedi() {
let instance = fediInstanceInput.value.trim();
if (!instance) {
return;
}
instance = fixURL(instance);
window.open(
`${instance}/share?text=${articleTitle}%20${articleLink}`,
'__blank'
);
closeFediInstanceDialog();
}
</script>
{{ end }}

View File

@ -1,19 +0,0 @@
{{ if .Site.Params.showcaseDir }}
{{ $showcasePosts := where site.RegularPages "Section" "in" .Site.Params.showcaseDir }}
<div class="postlist gridView">
{{ range (sort $showcasePosts "File.LogicalName") }}
{{ if in .File.Dir .Site.Params.showcaseDir }}
<article class="card postlistitem">
<div>
<h2>{{ .Title }}</h2>
{{ if .Params.image }}
<img src="{{ .Params.image }}" />
{{ end }}
<div>{{ .Content }}</div>
</div>
</article>
{{ end }}
{{ end }}
</div>
<hr />
{{ end }}

View File

@ -1,35 +0,0 @@
<h2>
{{ $title := .Title }}
{{ $section := .Section | humanize }}
{{ if and (ne $section $title) (ne $section "Tags") (ne $title (printf "%ss" $section)) }}
{{ $section }}:
{{ end }}
{{ if and (eq $section "Tags") (eq $section $title) }}
{{ i18n "tagsColumn" }}
{{ else }}
{{ if and (eq $section "Tags") (ne $section $title) }}{{ i18n "tagColumn" }} #{{ end }}{{ $title }}
{{ end }}
</h2>
<ul class="list">
{{ if and (eq $section "Tags") (eq $section $title) }}
{{/* if we're in the Tags section, sort alphabetically and don't show the date */}}
{{ range (sort .Pages "Title") }}
<li>
<a href="{{ .Permalink }}">#{{ .Title }}</a>
</li>
{{ end }}
{{ else }}
{{ range .Pages }}
<li>
<div>
<span class="date">
{{- partial "date.html" .Date -}}
</span>
<span>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</span>
</div>
</li>
{{ end }}
{{ end }}
</ul>

View File

@ -1,54 +0,0 @@
{{- partial "inject/content-before.html" . -}}
<article class="card single">
{{ if .Params.showTitle | default true }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ if (.Params.showDate | default true) }}
<p class="date">
<span title='{{ i18n "date" }}'></span>
{{- partial "date.html" .Date -}}
</p>
{{ end }}
{{ if and (.Params.toc | default false) (.Site.Params.tocBeforeImage | default false) }}
{{- partial "toc.html" . -}}
{{ end }}
{{ if .Params.Image }}
<figure style="margin: 0">
{{ if or (hasPrefix .Params.Image "/") (hasPrefix .Params.Image "http://") (hasPrefix .Params.Image "https://") }}
<img src="{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ else }}
<img src="{{ .Permalink }}/{{ .Params.Image }}" alt="{{ .Params.Alt }}" />
{{ end }}
{{ if .Params.ImageCaption }}
<figcaption>
<p>{{ .Params.ImageCaption | markdownify }}</p>
</figcaption>
{{ end }}
</figure>
{{ end }}
{{ if and (.Params.toc | default false) (not (.Site.Params.tocBeforeImage | default false)) }}
{{- partial "toc.html" . -}}
{{ end }}
<div>{{ .Content }}</div>
</article>
{{ if .Params.tags }}
{{ if not .Site.Params.paperCards }}<hr />{{ end }}
<p class="articleTagsContainer">
<span></span>
<strong>{{ i18n "tagsColumn" }}</strong>
{{ range sort .Params.tags }}
<a
{{ if site.Params.buttonTags | default false }}
class="buttonTag"
{{ end }}
href="/tags/{{ . | urlize }}">#{{ . }}</a>
{{ end }}
</p>
{{ end }}
{{- partial "inject/content-after.html" . -}}
{{ if .Params.showShare | default true }}
{{- partial "share_on_fediverse.html" . -}}
{{ end }}
{{- partial "commento.html" . -}}
{{- partial "cactus_chat.html" . -}}
{{- partial "related_articles.html" . -}}

View File

@ -1,4 +0,0 @@
<div class="articleToc">
{{ .TableOfContents }}
<hr />
</div>

View File

@ -1,10 +0,0 @@
{{ if .Site.Params.umamiScriptUrl }}
{{ if .Site.Params.umamiWebsiteId }}
<script
async
defer
data-website-id="{{ .Site.Params.umamiWebsiteId }}"
src="{{ .Site.Params.umamiScriptUrl }}"
></script>
{{ end }}
{{ end }}

View File

@ -1 +0,0 @@
<img src='{{ .Get "src" }}' alt='{{ .Get "alt" }}' style='max-width: {{ .Get "width" }};' />

View File

@ -1,33 +0,0 @@
{{ $h265 := .Get "h265" }}
{{ $h264 := .Get "h264" }}
{{ $vp9 := .Get "vp9" }}
{{ $vp8 := .Get "vp8" }}
{{ $caption := .Get "caption" }}
{{ $attr := .Get "attr" }}
{{ $attrlink := .Get "attrlink" }}
<figure>
<video autoplay loop controls style="max-width: 100%;">
{{ if $h265 }}
<source src='{{ $h265 }}' type="video/mp4" />
{{ end }}
{{ if $h264 }}
<source src='{{ $h264 }}' type="video/mp4" />
{{ end }}
{{ if $vp9 }}
<source src='{{ $vp9 }}' type="video/webm" />
{{ end }}
{{ if $vp8 }}
<source src='{{ $vp8 }}' type="video/webm" />
{{ end }}
</video>
{{ if or $caption $attr }}
<figcaption>
{{ if $caption }}
<p>{{ . }}</p>
{{ end }}
<p>
{{ if $attrlink }}<a href="{{ $attrlink }}">{{ end }}{{ $attr }}{{ if $attrlink }}</a>{{ end }}
</p>
</figcaption>
{{ end }}
</figure>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Some files were not shown because too many files have changed in this diff Show More