Migrate from old blog

This commit is contained in:
Huy-Ngo 2021-01-10 11:56:06 +07:00
parent 876ef86cdc
commit ff2a8653b3
4 changed files with 166 additions and 37 deletions

View File

@ -0,0 +1,72 @@
---
layout: post
title: "Giving up on WordPress!"
date: 2021-01-02 14:44:00 +0700
tags: blog wordpress writing selfhost
categories: blog update
---
For the last week, I was trying to setting up my own WordPress instance, since I have access to a server and use a free domain name. It was such a hassle. <!--more-->
## Why I want to start a blog
Writing is a way of polishing my writing skills. For so long, all what I write has been only code. Now that I'm close to my graduation, writing long text suddenly becomes important to me - I need to write reports and after that my thesis.
It is also a way of expressing myself. Social media is a shorter version for this, and they may attract more interactions from people you know, but blog on the other hand helps you express your idea and opinion publicly. They're also much more organized in the sense that my list of posts does not contain shares from other users, or that I can use hashtags to categorize my posts.
## Choosing WordPress
At first I was thinking of using wordpress.com, since it's already hosted, but then I realized they can put ads on my blogs without my consent (well, technically, they would have my consent if I used their service). On top of that, I always prefer self-hosting whenever possible: I have all control (doubt) over what is running and what not. I would not what a third party to track my readers or showing them ads on my blog.
The server was running on Ubuntu 16.04. That is a rather old one, so it doesn't support latest packages, including Apache, PHP, and WordPress (they do have WordPress in the Ubuntu repo), and I dare not upgrade it.
On the other hand, I already hosted some other services with Nginx there, so I'd prefer to use Nginx instead of Apache. They do have [that option](https://wordpress.org/support/article/nginx/), but alas, those configs file seem long and I was not sure if I would break something while editing the nginx.conf file.
I did try to use Nginx as a reverse proxy to my Apache server, though. It did work, but there is another problem, which I will talk about in a next section
## Using Docker
I also tried another option - docker. I wondered why I didn't think of it earlier.
I have recently been using docker quite regularly, e.g. for CouchDB and RethinkDB which aren't packaged for my distro, or SQLServer and MongoDB, which were required for my database course. Docker is a way to easily run some program in a contained environment with simple configuration that can be input from command line or docker-compose file. Most importantly, they're confirmed to work.
And nice, it did run.
Now I need to set up a domain name for the blog.
## Port forwarding
For personal reason, I'd rather not reveal my domain name here, so I'd use `example.com` in its place.
I signed up a domain name at freenom, and it only took me one day until the domain name is fully available.
The only problem is that `example.com` always show me a bad gateway response. I made sure my Nginx configuration were right, but somehow it weren't listening on port 80 - the default port for HTTP. I had to go to `example.com:12345` (the port I ran my docker on), and for normal users that doesn't look intuitive at all.
It turned out, I didn't link my configuration correctly, so there are broken symlinks in `/etc/nginx/sites-enabled/` and the configuration was never included.
After I fixed that, it worked nicely.
## Different name == broken website
WordPress uses absolute path (`example.com/blog/something`) rather than relative path (`/blog/something`). This leads to a problem: if I want to migrate to another domain name (guaranteed to happen, since I use a free domain name that will expire eventually). I discovered this when I moved from a port to different port, and from host IP to domain name. It frustrates me, but it isn't a big problem for now.
## Disappointing experience
I did successfully hosted my own WP instance, but it didn't feel right for me.
WordPress is so bloated. They target non-programmer, and they have a lot of drag-and-drop editing. It is hard for me to select the right block and edit it. They have a lot of features for images and widgets that I won't use. Of course I can remove those features, but they would take time and not is worth it.
As a result, I'm refrained from posting there.
## Write.as
Then I was recommended this page on [Mastodon](https://joinmastodon.org/). It feels so right to me: as a programmer I love writing with Markdown - the markup language is so easy to write, and it allows me to write quickly. I can also write it in a preferred text editor such as vim and paste the text here.
I did try to host my own [WriteFreely](https://writefreely.org/) instance (the technology behind write.as), but since I invested too much energy for WordPress I don't feel like it now, even though it seems simple according to the [installation instruction](https://writefreely.org/start). The [docker image](https://hub.docker.com/r/writeas/writefreely) is also not at all documented.
Fortunately, write.as already feels right to me - no ads, and tracking is easily opted out. The only problem here is that my domain name is wasted there.
## Update
Well, I just installed (it was actually easy!), and now I've moved to divers.ml
New update: I just tried jekyll, and it's awesome. Now my blog is hosted on [GitHub](https://huy-ngo.github.io). I guess I will leave the domain unused.

View File

@ -0,0 +1,56 @@
---
layout: post
title: "Moving away from Big Brother(s)"
date: 2021-01-02 14:44:00 +0700
tags: software freedom surveillance communication privacy
categories: freedom privacy
---
Due to a [recent event][whatsapp], people have been actively moving away from it to Telegram[^1] or Signal. This is the first step of moving away from Big Brother's surveillance. <!--more-->
## My personal story
Though I have never used WhatsApp, I myself have been using Facebook for quite a long time (about 8 years or so) and so do people around me. It is worrying that Facebook (along with Zalo, a popular messaging service in Vietnam) has become a de facto main communication channel between schools and students/parents and among family members.
It is hard to switch 100% to another service: people are too familiar with it, and are already connected to their "friends"[^2]. They are reluctant to switch to something new, which includes choosing an unknown service and probably a client, creating a new account[^3], and adding people there. And if no one is moving, you can't really move either.
I haven't used Facebook or Instagram for about two weeks, and I'm certainly happier - I don't have to deal with the negativity from Facebook drama or typical Facebook user hostile behaviors (my fault for joining so many groups). I still have to use Messenger, though, since my friends refuse to use matrix. I will delete that soon enough, along with my Facebook account.
## Things to do
Deleting Facebook account probably does not keep you entirely from Facebook's greed, but it sure is a great first step: you thereby declare your privacy and that you do not allow them to collect your data.
Facebook can probably track you via other means, such as ads, or embedded comments on other websites. To avoid this, block trackers with some extension such as [Ghostery][ghost]. It also blocks tracking ads from Google.
I also recommend [LibreJS][librejs], a browser extension by GNU that blocks nonfree JavaScript. These scripts can unknowingly send data to the server as well. However, since not everyone is aware of GNU's guidelines for licensing JavaScript, it may blocks some free JavaScript as well (example being that of [Element][element] and [Hydrogen][H] being blocked).
Facebook is not the only Big Brother that keeps surveilling you: on top of my head, there are Microsoft, Google, and Apple. Unfortunately, they stand behind ones of the most popular operating systems for a lot of devices, namely Windows, MacOS, Android[^4], and iOS. This gives them a lot of power over a majority of users - they can easily listen to every process you run, every file you download or upload. Computer users should switch to a GNU/Linux distros of their choice for their own good. For mobile phone, you can try installing Replicant (Android replacement) or buy a GNU/Linux mobile phone (e.g. PinePhone or Librem), though I cannot confirm their ease of use, for I haven't tried.
It doesn't stop there: they also own many services that may pose privacy concerns or censorship whose replacements can be found below:
- YouTube: PeerTube is an alternative, though it can be slow if there is no peer near you. Invidious and NewPipe are free clients that let you watch YouTube videos without ads (i.e. Google's trackers). Don't mind about "supporting them" with ads - it's not worth it - you can support them by donating them some money instead.
- Google search: I'm not aware of a decent free search engine, but DuckDuckGo and Ecosia claim they respect user's data and do not store nor sell them
- Google translate: if you're a language learner like me, I strongly suggest looking up in dictionary instead.
- Google Map: I'm not aware of a good alternative, please suggest some
- GMail: tons of mail providers are out there, it's not hard to find one. The only problem is that so many services allow you to sign in with GMail that you probably are dependent on it by now.
- GitHub: git hosting is very common. I use [disroot] and [source hut], but there are others such as [gogs] or [GitLab]. Even though I'm not aware of tracking via GitHub, there has recently been an incident proving its untrustworthiness.
- LinkedIn: again, I'm not aware of free alternative for the same purpose, though I didn't find LinkedIn useful myself.
## Footnotes
[^1]: Telegram's client is [open source](https://github.com/tdlib); its server and protocol are probably not.
[^2]: For many people, this is acquaintance plus or minus family.
[^3]: Creating a new account should be a simple process, but for many people, especially the elderly, find this troublesome and have to rely on their children for it.
[^4]: Even though Android itself is free, it contains many nonfree parts, and mobile phones running on Android are often shipped with Google Play Service (and/or sometimes the surveillance system of the manufacturer)
[whatsapp]: https://www.osnews.com/story/132828/whatsapp-gives-users-an-ultimatum-share-data-with-facebook-or-stop-using-the-app/
[rms]: https://stallman.org/facebook.html
[ghost]: https://github.com/ghostery/ghostery-extension
[librejs]: https://savannah.gnu.org/projects/librejs/
[element]: https://app.element.io
[H]: https://hydrogen.element.io
[disroot]: https://git.disroot.org
[source hut]: https://sr.ht
[gogs]: https://gogs.io/
[GitLab]: https://gitlab.com/gitlab-org/gitlab-foss

View File

@ -1,29 +0,0 @@
---
layout: post
title: "Welcome to Jekyll!"
date: 2021-01-10 10:38:27 +0700
categories: jekyll update
---
Youll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
Jekyll requires blog post files to be named according to the following format:
`YEAR-MONTH-DAY-title.MARKUP`
Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekylls GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/

View File

@ -4,15 +4,45 @@ title: About
permalink: /about/
---
This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)
# About
You can find the source code for Minima at GitHub:
[jekyll][jekyll-organization] /
[minima](https://github.com/jekyll/minima)
I am Huy. Use the pronoun "he" to refer to me in third person. I'm from Vietnam and besides Vietnamese and English; I also speak some French and German. I write mainly in English, since that's the one I'm most comfortable with, but not limited to that. If I write a blog in another language, I probably will translate it later.
You can find the source code for Jekyll at GitHub:
[jekyll][jekyll-organization] /
[jekyll](https://github.com/jekyll/jekyll)
I am a backend web developer, though I'm open to experiment in other fields as well. You can look at my project on [GitHub](https://github.com/Huy-Ngo/), [Disroot Git](https://git.disroot.org/huyngo), or [source hut](sr.ht/~huyngo/) (the latter two haven't had many projects yet).
## What is this blog about ?
[jekyll-organization]: https://github.com/jekyll
It's about various things:
- Programming
- Learning languages
- Conlanging
- Digital freedom
- Books or fiction in general
## Contact
Feel free to contact me via:
- Mastodon: [@huy_ngo@fosstodon][fosstodon]
- Matrix: [@xarvos:matrix.org][matrix]
- Email: [Gmail][gmail] or [Disroot mail][disroot]
If you are an employer, please know that I may not be always available since I'm currently a student, though I am looking for internship in the next few months. If you want to contact me, please only contact me via email and let me know who you are, what you are working with, and which position are you offering. I'm not comfortable with telephone call so please don't suggest that.
## Copying
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />All content in this blog is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>, unless stated otherwise.
This means you are free to share the posts and modify them, provided that you attribute properly, link to the original content, and state your changes. Additionally, you have to share those changes under the same license.
## Acknowledgement
This blog is built with [jekyll] and its [minima] theme.
[fosstodon]: https://fosstodon.org/@huy_ngo
[matrix]: https://matrix.to/#/@xarvos:matrix.org
[gmail]: mailto:duchuy29092000@gmail.com
[disroot]: mailto:huyngo@disroot.org
[jekyll]: https://github.com/jekyll/jekyll
[minima]: https://github.com/jekyll/minima