fix(excerpt): Reduce post excerpt to one-line

This commit is contained in:
curben 2019-06-06 20:52:43 +09:30
parent 7a3f86f5b7
commit 9d09797f7d
25 changed files with 72 additions and 25 deletions

View File

@ -5,6 +5,7 @@ tags:
- Linux - Linux
- Alpine - Alpine
--- ---
Here is the list of binaries shipped with the Docker image of Alpine Linux `alpine:3.8` Here is the list of binaries shipped with the Docker image of Alpine Linux `alpine:3.8`
<!-- more --> <!-- more -->

View File

@ -4,6 +4,7 @@ date: 2018-10-24
tags: tags:
- Linux - Linux
--- ---
The default Control+Alt+S shortcut conflicts with Notepad++ 'Save As' shortcut, here's how to disable it. The default Control+Alt+S shortcut conflicts with Notepad++ 'Save As' shortcut, here's how to disable it.
<!-- more --> <!-- more -->

View File

@ -7,10 +7,12 @@ tags:
- DoH - DoH
--- ---
Recently I stumbled upon this [bug report](https://lists.zx2c4.com/pipermail/wireguard/2019-February/003902.html), and as a side note, the reporter wants to use DNS-over-TLS (DoT) for privacy reasons; to prevent the ISP from knowing visited website. It turns out many also believe this after a brief search for news articles on DoT or DNS-over-HTTPS (DoH). Actually, DoT/DoH does not completely eliminate ISP surveillance. Here's why, DoT/DoH does not completely eliminate ISP surveillance.
<!-- more --> <!-- more -->
Recently I stumbled upon this [bug report](https://lists.zx2c4.com/pipermail/wireguard/2019-February/003902.html), and as a side note, the reporter wants to use DNS-over-TLS (DoT) for privacy reasons; to prevent the ISP from knowing visited website. It turns out many also believe this after a brief search for news articles on DoT or DNS-over-HTTPS (DoH). Actually, DoT/DoH does not completely eliminate ISP surveillance.
ISP still knows what **IP address** you are connecting to. Even with HTTPS and DoT/DoH, ISP currently can sniff the website domain you are visiting/visited including the complete URL due to a security weakness in the [Server Name Indication](https://en.wikipedia.org/wiki/Server_Name_Indication). This weakness can be fixed by using [Encrypted SNI](https://blog.cloudflare.com/esni/) (ESNI). ISP still knows what **IP address** you are connecting to. Even with HTTPS and DoT/DoH, ISP currently can sniff the website domain you are visiting/visited including the complete URL due to a security weakness in the [Server Name Indication](https://en.wikipedia.org/wiki/Server_Name_Indication). This weakness can be fixed by using [Encrypted SNI](https://blog.cloudflare.com/esni/) (ESNI).
But even with all that, I repeat, ISP still *knows* what IP address you are connecting to. A simple reverse DNS lookup or even just by visiting the IP address can reveal what website it belongs to. Reverse DNS lookup is indeed not as easy as ten years ago due to the current proliferation of content delivery network (CDN) like Cloudflare. But it is still possible. For example, A `dig startpage @9.9.9.9` returned `216.218.239.2`. When you go to the IP through a web browser, it redirects to startpage.com. Going to gitlab.com's IP resulted in SSL warning with gitlab.com shown as the valid hostname. But even with all that, I repeat, ISP still *knows* what IP address you are connecting to. A simple reverse DNS lookup or even just by visiting the IP address can reveal what website it belongs to. Reverse DNS lookup is indeed not as easy as ten years ago due to the current proliferation of content delivery network (CDN) like Cloudflare. But it is still possible. For example, A `dig startpage @9.9.9.9` returned `216.218.239.2`. When you go to the IP through a web browser, it redirects to startpage.com. Going to gitlab.com's IP resulted in SSL warning with gitlab.com shown as the valid hostname.

View File

@ -6,11 +6,14 @@ tags:
- Stats - Stats
- LimeSurvey - LimeSurvey
--- ---
On LimeSurvey, making minor edits to multiple questions can be quite a chore. `List Questions` view allows you to edit multiple questions at the same time.
**List Questions** view allows you to edit multiple questions at the same time.
<!-- more --> <!-- more -->
`List Questions` view allows you to delete, set 'mandatory', 'other', CSS class, and randomise multiple questions at the same time. On LimeSurvey, making minor edits to multiple questions can be quite a chore. `List Questions` view allows you to edit multiple questions at the same time.
**List Questions** view allows you to delete, set 'mandatory', 'other', CSS class, and randomise multiple questions at the same time.
Edit: The view is accessible through (Survey) Settings > Survey menu > List questions. Edit: The view is accessible through (Survey) Settings > Survey menu > List questions.

View File

@ -6,10 +6,12 @@ tags:
- Web - Web
--- ---
Website usually embed SVG using `<img>` tag or directly use the `<svg>` tag. Using `<img>` tag prevents the use of CSS to change property of SVG. As for inline `<svg>`, I prefer to have a separate file that is easier to keep track. Using `<img>` tag prevents the use of CSS to change property of SVG. Use `<use>` instead.
<!-- more --> <!-- more -->
Website usually embed SVG using `<img>` tag or directly use the `<svg>` tag. Using `<img>` tag prevents the use of CSS to change property of SVG. As for inline `<svg>`, I prefer to have a separate file that is easier to keep track.
## Embed SVG file ## Embed SVG file
Utilise `<use>` tag to embed an SVG file in `svg`. For example in this blog, I have a search button on the top right corner. This is how I embed the [search.svg](/svg/search.svg): Utilise `<use>` tag to embed an SVG file in `svg`. For example in this blog, I have a search button on the top right corner. This is how I embed the [search.svg](/svg/search.svg):

View File

@ -5,10 +5,13 @@ lastUpdated: 2019-01-13
tags: tags:
- Security - Security
--- ---
Facebook/Instagram/Whatsapp/Google are blocked in China. You can either use data roaming or VPN to access them. Roll your own VPN if you don't trust commercial VPN provider.
Data roaming, commercial VPN provider to rolling your own VPN.
<!-- more --> <!-- more -->
Facebook/Instagram/Whatsapp/Google are blocked in China. You can either use data roaming or VPN to access them. Roll your own VPN if you don't trust commercial VPN provider.
## Data Roaming ## Data Roaming
Data roaming using a foreign SIM is the easiest and most reliable method. You don't need to install any app, just pop the SIM, enable data roaming and you're good to go. Any foreign SIM would work, as long it's not Mainland China. Hong Kong, Macau or Taiwan's SIM is considered as a foreign SIM, so it works as well. Data roaming using a foreign SIM is the easiest and most reliable method. You don't need to install any app, just pop the SIM, enable data roaming and you're good to go. Any foreign SIM would work, as long it's not Mainland China. Hong Kong, Macau or Taiwan's SIM is considered as a foreign SIM, so it works as well.

View File

@ -8,10 +8,12 @@ tags:
- DoH - DoH
--- ---
Many criticise Firefox for using Cloudflare by default in DNS-over-HTTPS. In reality, it's **not enabled** by default and you can **easily switch** to other providers. It's not enabled by default and you can easily switch to other providers.
<!-- more --> <!-- more -->
Many criticise Firefox for using Cloudflare by default in DNS-over-HTTPS. In reality, it's **not enabled** by default and you can **easily switch** to other providers.
{% cloudinary '20190525/firefox-doh.png' "'DNS over HTTPS' setting in Firefox" %} {% cloudinary '20190525/firefox-doh.png' "'DNS over HTTPS' setting in Firefox" %}
That's right, as of version 66, it's *still* **not** enabled by default. You want to use DNS-over-HTTPS but not to use Cloudflare? Just click on 'Custom' and enter the provider's address. There are a few to choose from. Refer to the lists provided by [AdGuard](https://kb.adguard.com/en/general/dns-providers) and [cURL](https://github.com/curl/curl/wiki/DNS-over-HTTPS). That's right, as of version 66, it's *still* **not** enabled by default. You want to use DNS-over-HTTPS but not to use Cloudflare? Just click on 'Custom' and enter the provider's address. There are a few to choose from. Refer to the lists provided by [AdGuard](https://kb.adguard.com/en/general/dns-providers) and [cURL](https://github.com/curl/curl/wiki/DNS-over-HTTPS).

View File

@ -6,10 +6,12 @@ tags:
- Privacy - Privacy
--- ---
Running more than one Firefox instance allows you to use multiple cookies for a website. By default, you are limited to two separate cookies through *regular* and *private* windows. Using Firefox's **profiles**, you can use more than two. Using Firefox profiles, you can use more than two instances.
<!-- more --> <!-- more -->
Running more than one Firefox instance allows you to use multiple cookies for a website. By default, you are limited to two separate cookies through *regular* and *private* windows. Using Firefox's **profiles**, you can use more than two.
For example, you are looking for item A and B at a shopping website using the private window but you prefer to keep the browsing separate as not to let the website knows that you are browsing both of them. Or you want to login to more than two accounts of a website. For example, you are looking for item A and B at a shopping website using the private window but you prefer to keep the browsing separate as not to let the website knows that you are browsing both of them. Or you want to login to more than two accounts of a website.
A useful feature of Firefox is that it allows more than one profile, which otherwise would requires multiple operating system accounts. The feature even allows you to run multiple profiles at the same time by having multiple instances. A useful feature of Firefox is that it allows more than one profile, which otherwise would requires multiple operating system accounts. The feature even allows you to run multiple profiles at the same time by having multiple instances.

View File

@ -6,7 +6,8 @@ tags:
- Linux - Linux
- Alpine - Alpine
--- ---
TL;DR Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently. Here's how they differ.
Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently.
<!-- more --> <!-- more -->

View File

@ -5,10 +5,12 @@ tags:
- Hexo - Hexo
--- ---
In {% post_link how-to-create-a-hexo-blog 'previous post' %}, I showed you how to create a blog using [Hexo](https://hexo.io) and host it on [GitLab Pages](https://about.gitlab.com/features/pages/). Here's how to host it on [GitHub Pages](https://pages.github.com/): Host your Hexo blog for free on GitHub Pages.
<!-- more --> <!-- more -->
In {% post_link how-to-create-a-hexo-blog 'previous post' %}, I showed you how to create a blog using [Hexo](https://hexo.io) and host it on [GitLab Pages](https://about.gitlab.com/features/pages/). Here's how to host it on [GitHub Pages](https://pages.github.com/):
## GitHub repository ## GitHub repository
1. Register a free [GitHub](https://github.com/join) account or use your current one. 1. Register a free [GitHub](https://github.com/join) account or use your current one.
2. Create a repo named <b>*username*.github.io</b>, where username is your username on GitHub. 2. Create a repo named <b>*username*.github.io</b>, where username is your username on GitHub.

View File

@ -4,7 +4,8 @@ date: 2018-10-02
tags: tags:
- Linux - Linux
--- ---
The side pane of Caja shows many media folders by default. Most of them not important enough to show up on side pane.
How to hide them.
<!-- more --> <!-- more -->

View File

@ -6,10 +6,13 @@ tags:
- Hexo - Hexo
- GitLab - GitLab
--- ---
Create a website/blog using Hexo on [GitLab Pages](https://about.gitlab.com/features/pages/) for free using the following guide. Refer to my {% post_link hexo-blog-github 'another guide' %} for [GitHub Pages](https://pages.github.com/).
Create a website/blog using Hexo on GitLab Pages for free using this detailed guide.
<!-- more --> <!-- more -->
Create a website/blog using Hexo on [GitLab Pages](https://about.gitlab.com/features/pages/) for free using the following guide. Refer to my {% post_link hexo-blog-github 'another guide' %} for [GitHub Pages](https://pages.github.com/).
## GitLab project ## GitLab project
1. Register a free [GitLab](https://gitlab.com/users/sign_in#register-pane) account or use your current one. 1. Register a free [GitLab](https://gitlab.com/users/sign_in#register-pane) account or use your current one.
2. Fork the [repo of this blog](https://gitlab.com/curben/blog). 2. Fork the [repo of this blog](https://gitlab.com/curben/blog).

View File

@ -6,10 +6,13 @@ tags:
- Microsoft - Microsoft
--- ---
Windows 10 comes bundled with many unused apps. Worse, it even install third-party apps from time to time by *itself* (even after you remove it!). Here's how to get rid of these bloatware. How to get rid of these bloatware.
<!-- more --> <!-- more -->
Windows 10 comes bundled with many unused apps. Worse, it even install third-party apps from time to time by *itself* (even after you remove it!). Here's how to get rid of these bloatware.
## Stop uninstalled games from returning ## Stop uninstalled games from returning
Stop included games like Candy Crush and Minecraft to reappear after you remove them. Stop included games like Candy Crush and Minecraft to reappear after you remove them.

View File

@ -6,7 +6,7 @@ tags:
- Hexo - Hexo
--- ---
Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth. Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth and speed up the website.
<!-- more --> <!-- more -->

View File

@ -5,10 +5,12 @@ tags:
- PDF - PDF
--- ---
The most effective ways of reducing the file size of a PDF is by converting to grayscale and reduce the resolution. Convert to grayscale and reduce the resolution.
<!-- more --> <!-- more -->
The most effective ways of reducing the file size of a PDF is by converting to grayscale and reduce the resolution.
Requirement: ghostscript (installed by default in Ubuntu) Requirement: ghostscript (installed by default in Ubuntu)
## Single PDF ## Single PDF

View File

@ -6,10 +6,12 @@ tags:
- Android - Android
--- ---
[microG](https://microg.org/) is an open source re-implementation of Google Play Service/Services Framework. While the core of the Android OS is still open source, much of the core apps, libraries and APIs are proprietary. Refer to [this article](https://arstechnica.com/gadgets/2018/07/googles-iron-grip-on-android-controlling-open-source-by-any-means-necessary/) for more info. The core of the Android OS is open source, but much of the core apps, libraries and APIs are proprietary.
<!-- more --> <!-- more -->
[microG](https://microg.org/) is an open source re-implementation of Google Play Service/Services Framework. While the core of the Android OS is still open source, much of the core apps, libraries and APIs are proprietary. Refer to [this article](https://arstechnica.com/gadgets/2018/07/googles-iron-grip-on-android-controlling-open-source-by-any-means-necessary/) for more info.
Adding to this issue is having all the APIs packaged into a single monolithic Play Services APK. So, all the APIs are loaded at all time, even though some APIs like Cast is not going to be used 24/7. This leads to memory bloat. Despite [effort](https://arstechnica.com/gadgets/2017/09/android-8-0-oreo-thoroughly-reviewed/8/#h3) to split it into separate APKs, subsequent [updates](https://www.apkmirror.com/apk/google-inc/google-play-services/) are seldom smaller. The current version (as of writing) is [40+ MB](https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-14-7-99-release/), while microG's implementation is merely [2.6 MB](https://microg.org/download.html). Adding to this issue is having all the APIs packaged into a single monolithic Play Services APK. So, all the APIs are loaded at all time, even though some APIs like Cast is not going to be used 24/7. This leads to memory bloat. Despite [effort](https://arstechnica.com/gadgets/2017/09/android-8-0-oreo-thoroughly-reviewed/8/#h3) to split it into separate APKs, subsequent [updates](https://www.apkmirror.com/apk/google-inc/google-play-services/) are seldom smaller. The current version (as of writing) is [40+ MB](https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-14-7-99-release/), while microG's implementation is merely [2.6 MB](https://microg.org/download.html).
Despite the minimal size of microG, it's actually usable if you can shift away from the Google Apps (which is the goal of microG anyway). Most of us have grown to rely on services offered by Google and moving away from them is not easy. The good news is, there are plenty of great alternatives out there. Despite the minimal size of microG, it's actually usable if you can shift away from the Google Apps (which is the goal of microG anyway). Most of us have grown to rely on services offered by Google and moving away from them is not easy. The good news is, there are plenty of great alternatives out there.

View File

@ -6,10 +6,12 @@ tags:
- Android - Android
--- ---
Following my switch to [microG](https://microg.org/) (an open source re-implementation of Google Play), some Google Apps stopped working ({% post_link microg-google-play-replacement 'read here' %}). During my search for replacements, I discover many open source alternatives. These are the apps I'm currently using and recommend to everyone. Apps I'm currently using and recommend to everyone.
<!-- more --> <!-- more -->
Following my switch to [microG](https://microg.org/) (an open source re-implementation of Google Play), some Google Apps stopped working ({% post_link microg-google-play-replacement 'read here' %}). During my search for replacements, I discover many open source alternatives. These are the apps I'm currently using and recommend to everyone.
Aside from the below list, check out the NanoDroid's [list](https://gitlab.com/Nanolx/NanoDroid/blob/master/doc/Applications.md) of other great open source alternatives. Aside from the below list, check out the NanoDroid's [list](https://gitlab.com/Nanolx/NanoDroid/blob/master/doc/Applications.md) of other great open source alternatives.
Name | Previous | Comment Name | Previous | Comment

View File

@ -6,10 +6,12 @@ tags:
- Web - Web
--- ---
TrueCrypt and KeePassX have been discontinued while Adblock Plus has been [commercialised](https://en.wikipedia.org/wiki/Adblock_Plus#Controversy_over_ad_filtering_and_ad_whitelisting). Their replacements are [VeraCrypt](https://www.veracrypt.fr/), [KeePassXC](https://keepassxc.org/) and [uBlock Origin](https://github.com/gorhill/uBlock/) respectively. Some have been discontinued while others have been commercialised.
<!-- more --> <!-- more -->
TrueCrypt and KeePassX have been discontinued while Adblock Plus has been [commercialised](https://en.wikipedia.org/wiki/Adblock_Plus#Controversy_over_ad_filtering_and_ad_whitelisting). Their replacements are [VeraCrypt](https://www.veracrypt.fr/), [KeePassXC](https://keepassxc.org/) and [uBlock Origin](https://github.com/gorhill/uBlock/) respectively.
## VeraCrypt ## VeraCrypt
{% cloudinary '20190115/veracrypt.png' 'Screenshot of VeraCrypt' %} {% cloudinary '20190115/veracrypt.png' 'Screenshot of VeraCrypt' %}

View File

@ -4,10 +4,13 @@ date: 2018-10-24
tags: tags:
- Node - Node
--- ---
Installing a package with `--global` introduce more trouble than convenience. Here's how to run binaries of locally installed node packages.
How to run binaries of locally installed node packages.
<!-- more --> <!-- more -->
Installing a package with `--global` introduce more trouble than convenience. Here's how to run binaries of locally installed node packages.
By default, `npm install` installs packages as listed in `package.json` at 'node_modules' of your project folder. When a package ships with executables/binaries, usually user would install it globally using `sudo npm install --global/-g`. By default, `npm install` installs packages as listed in `package.json` at 'node_modules' of your project folder. When a package ships with executables/binaries, usually user would install it globally using `sudo npm install --global/-g`.
But you should try to avoid using `--global`. Installing globally means using a specific version of a package across different projects. It might be fine in certain use cases, but it would cause version conflict time when different project depends on different versions. But you should try to avoid using `--global`. Installing globally means using a specific version of a package across different projects. It might be fine in certain use cases, but it would cause version conflict time when different project depends on different versions.

View File

@ -9,12 +9,14 @@ tags:
- Alpine - Alpine
--- ---
Synk depends on GNU version of `patch` utility.
<!-- more -->
Snyk initially runs fine on Alpine, until you try to `snyk protect` to patch the modules. Turns out Synk depends on GNU version of `patch` utility. Snyk initially runs fine on Alpine, until you try to `snyk protect` to patch the modules. Turns out Synk depends on GNU version of `patch` utility.
***Edit:*** Snyk [v1.131.0](https://github.com/snyk/snyk/releases/tag/v1.131.0) onwards no longer use `patch`. ***Edit:*** Snyk [v1.131.0](https://github.com/snyk/snyk/releases/tag/v1.131.0) onwards no longer use `patch`.
<!-- more -->
Snyk is used to patch vulnerabilities of node_modules (read my {% post_link secure-node-modules-snyk 'previous post' %} for installation guide). I never had any issue with it running on Alpine docker image. That was because there was no modules to patch. Snyk is used to patch vulnerabilities of node_modules (read my {% post_link secure-node-modules-snyk 'previous post' %} for installation guide). I never had any issue with it running on Alpine docker image. That was because there was no modules to patch.
That is until I install [renovate](https://github.com/renovatebot/renovate), which has [vulnerabilities](https://snyk.io/test/npm/renovate) that can be patched. That is until I install [renovate](https://github.com/renovatebot/renovate), which has [vulnerabilities](https://snyk.io/test/npm/renovate) that can be patched.

View File

@ -4,12 +4,15 @@ date: 2018-10-14
tags: tags:
- Markdown - Markdown
--- ---
Ghostwriter is a Markdown editor with html preview. Previously I used [StackEdit](https://stackedit.io/app), but it's web-based.
Ghostwriter has built-in US English spellcheck. It supports [Hunspell](https://hunspell.github.io/) dictionaries for other languages. It supports Hunspell dictionaries for spellcheck of other languages.
<!-- more --> <!-- more -->
Ghostwriter is a Markdown editor with html preview. Previously I used [StackEdit](https://stackedit.io/app), but it's web-based.
It has built-in US English spellcheck. It supports [Hunspell](https://hunspell.github.io/) dictionaries for other languages.
To install other languages is easy, for Danish: To install other languages is easy, for Danish:
```bash ```bash

View File

@ -5,7 +5,7 @@ tags:
- Stats - Stats
--- ---
Choosing a suitable statistical test depends on the design of the experiment, notably the number and the type of variables. Following are the guides (or rather cheat sheets) that I have gathered so far. Choosing a suitable statistical test depends on the design of the experiment, notably the number and the type of variables.
<!-- more --> <!-- more -->

View File

@ -5,10 +5,12 @@ tags:
- Linux - Linux
--- ---
Before you use any Unix tools to process some file, make sure the file only use Unix [line endings](https://en.wikipedia.org/wiki/Newline#Representation). Before you use any Unix tools to process some file, make sure the file only use Unix line endings.
<!-- more --> <!-- more -->
Before you use any Unix tools to process some file, make sure the file only use Unix [line endings](https://en.wikipedia.org/wiki/Newline#Representation).
Note that many text files you downloaded most probably use Windows line endings. Note that many text files you downloaded most probably use Windows line endings.
To [recap](https://en.wikipedia.org/wiki/Newline#Representation), To [recap](https://en.wikipedia.org/wiki/Newline#Representation),

View File

@ -5,10 +5,12 @@ tags:
- GitLab - GitLab
--- ---
It can be frustrating after you push the changes you made to `.gitlab-ci.yml`, only to discover later that it's invalid on gitlab.com. Here's how to verify/lint the config. How to verify/lint the config.
<!-- more --> <!-- more -->
It can be frustrating after you push the changes you made to `.gitlab-ci.yml`, only to discover later that it's invalid on gitlab.com. Here's how to verify/lint the config.
Login to GitLab.com and navigate to any of your repo or project. It must be under your account. If you don't have one, simply create a new project or fork one. Login to GitLab.com and navigate to any of your repo or project. It must be under your account. If you don't have one, simply create a new project or fork one.
Simply add `/-/ci/lint` to the end of your repo link and navigate to that link. Simply add `/-/ci/lint` to the end of your repo link and navigate to that link.

View File

@ -5,6 +5,7 @@ tags:
- Stats - Stats
- LimeSurvey - LimeSurvey
--- ---
In array type question, when you add many answer options, some words might break into next line, especially when the word is long. In array type question, when you add many answer options, some words might break into next line, especially when the word is long.
<!-- more --> <!-- more -->