docs: Add tags

This commit is contained in:
curben 2019-02-09 16:31:22 +10:30
parent 1cf92c7746
commit 9b2714be62
22 changed files with 47 additions and 13 deletions

View File

@ -2,6 +2,8 @@
title: Default binaries in Alpine docker image title: Default binaries in Alpine docker image
date: 2018-10-10 00:00:00 date: 2018-10-10 00:00:00
tags: tags:
- Linux
- 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`

View File

@ -2,6 +2,7 @@
title: How to disable Control+Alt+S shortcut in MATE title: How to disable Control+Alt+S shortcut in MATE
date: 2018-10-24 00:00:00 date: 2018-10-24 00:00:00
tags: tags:
- 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.
@ -32,4 +33,4 @@ Toggle 'Use default value' to off, and set the custom value as `disabled`.
Finally, disable the shortcut in CCSM. Go to General Options > Key bindings (tab) > Toggle Window Shaded (last value). Finally, disable the shortcut in CCSM. Go to General Options > Key bindings (tab) > Toggle Window Shaded (last value).
{% cloudinary 20181024/ccsm.png %} {% cloudinary 20181024/ccsm.png %}

View File

@ -3,6 +3,8 @@ title: Edit multiple questions on LimeSurvey
date: 2018-10-18 00:00:00 date: 2018-10-18 00:00:00
lastUpdated: 2018-10-26 00:00:00 lastUpdated: 2018-10-26 00:00:00
tags: tags:
- Stats
- 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. 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.
@ -34,4 +36,4 @@ This is what ListQuestions view looks like,
The view is also useful for quickly open multiple questions. Simply ctrl + left click or just middle click on the Edit button to open the question (to edit) in new tab. The view is also useful for quickly open multiple questions. Simply ctrl + left click or just middle click on the Edit button to open the question (to edit) in new tab.
{% cloudinary 20181018/limesurvey-edit.png %} {% cloudinary 20181018/limesurvey-edit.png %}

View File

@ -3,6 +3,7 @@ title: Access Facebook/Instagram/Whatsapp/Google in China
date: 2018-12-31 00:00:00 date: 2018-12-31 00:00:00
lastUpdated: 2019-01-13 00:00:00 lastUpdated: 2019-01-13 00:00:00
tags: tags:
- 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. 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.
@ -80,4 +81,4 @@ You can roll your own VPN if you don't trust commercial provider. [Algo](https:/
In my experience, despite Algo's effort, I still think it's much harder than using a commercial VPN provider. This is not Algo's fault actually. Setting up an EC2 account is too complicated than it should, and the complex Amazon cloud ecosystem is not helping. In my experience, despite Algo's effort, I still think it's much harder than using a commercial VPN provider. This is not Algo's fault actually. Setting up an EC2 account is too complicated than it should, and the complex Amazon cloud ecosystem is not helping.
Anyhow, for best results with Algo, I recommend using multiple cloud providers in multiple locations, in case one of them is blocked. Anyhow, for best results with Algo, I recommend using multiple cloud providers in multiple locations, in case one of them is blocked.

View File

@ -3,6 +3,8 @@ title: GNU vs BusyBox Unix tools
date: 2018-10-13 00:00:00 date: 2018-10-13 00:00:00
lastUpdated: 2018-10-31 00:00:00 lastUpdated: 2018-10-31 00:00:00
tags: tags:
- Linux
- Alpine
--- ---
TL;DR Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently. Here's how they differ. TL;DR Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently. Here's how they differ.
@ -50,4 +52,4 @@ I tested the tools on Alpine and Ubuntu, and noted their behaviour. BusyBox = BB
- **unzip**: GNU doesn't support stdin as input. Use funzip to decompress stdin, but only extract the first file like zcat. BB support stdin and extract all files, through `unzip -`. - **unzip**: GNU doesn't support stdin as input. Use funzip to decompress stdin, but only extract the first file like zcat. BB support stdin and extract all files, through `unzip -`.
- **sed**: BB doesn't support -z argument which is used to find/replace \n new line character. A [workaround](https://stackoverflow.com/a/1252191) is `sed ':a;N;$!ba;s/\n/<new character>/g' file` or `sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/<new character>/g' file`. GNU `sed -z 's/\n/<new character>/g' ` works. - **sed**: BB doesn't support -z argument which is used to find/replace \n new line character. A [workaround](https://stackoverflow.com/a/1252191) is `sed ':a;N;$!ba;s/\n/<new character>/g' file` or `sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/<new character>/g' file`. GNU `sed -z 's/\n/<new character>/g' ` works.
- **bsdtar**: Since GNU's zcat and funzip can only extract the first file, in addition to BB's unzip, another alternative is bsdtar. bsdtar can be installed through `libarchive-tools` package. To extract zip from stdin, use `$ bsdtar -xf -`. - **bsdtar**: Since GNU's zcat and funzip can only extract the first file, in addition to BB's unzip, another alternative is bsdtar. bsdtar can be installed through `libarchive-tools` package. To extract zip from stdin, use `$ bsdtar -xf -`.
- **patch**: BB doesn't support `--backup` option. BSD doesn't support `--verbose` option. - **patch**: BB doesn't support `--backup` option. BSD doesn't support `--verbose` option.

View File

@ -2,6 +2,7 @@
title: How to create a Hexo blog on GitHub Pages title: How to create a Hexo blog on GitHub Pages
date: 2018-11-10 00:00:00 date: 2018-11-10 00:00:00
tags: tags:
- 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/): 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/):

View File

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

View File

@ -3,6 +3,8 @@ title: How to create a Hexo blog on GitLab Pages
date: 2018-09-21 00:00:00 date: 2018-09-21 00:00:00
lastUpdated: 2018-11-10 00:00:00 lastUpdated: 2018-11-10 00:00:00
tags: tags:
- Hexo
- 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](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/).

View File

@ -3,6 +3,7 @@ title: How to remove Windows 10 default apps
date: 2018-09-26 00:00:00 date: 2018-09-26 00:00:00
lastUpdated: 2019-01-03 00:00:00 lastUpdated: 2019-01-03 00:00:00
tags: tags:
- 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. 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.
<!-- more --> <!-- more -->

View File

@ -3,6 +3,7 @@ title: Make Hexo blog smaller
date: 2018-09-28 00:00:00 date: 2018-09-28 00:00:00
lastUpdated: 2018-10-06 00:00:00 lastUpdated: 2018-10-06 00:00:00
tags: tags:
- 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.
<!-- more --> <!-- more -->

View File

@ -2,6 +2,7 @@
title: Make PDF files smaller title: Make PDF files smaller
date: 2019-01-05 00:00:00 date: 2019-01-05 00:00:00
tags: tags:
- PDF
--- ---
The most effective ways of reducing the file size of a PDF is by converting to grayscale and reduce the resolution. The most effective ways of reducing the file size of a PDF is by converting to grayscale and reduce the resolution.

View File

@ -3,6 +3,7 @@ title: microG, a replacement for the proprietary Google Play Services
date: 2019-01-12 00:00:00 date: 2019-01-12 00:00:00
lastUpdated: 2019-02-05 00:00:00 lastUpdated: 2019-02-05 00:00:00
tags: tags:
- 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. [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.
@ -61,4 +62,4 @@ For proprietary apps, use Yalp Store. You can use built-in credential to install
**App**. Whatsapp, Facebook Messenger and other chatting apps **App**. Whatsapp, Facebook Messenger and other chatting apps
**Issue**: A delay in receiving message **Issue**: A delay in receiving message
**Info**: Enable "Google Cloud Messaging" in microG Settings and allow relevant apps to register. **Info**: Enable "Google Cloud Messaging" in microG Settings and allow relevant apps to register.

View File

@ -3,6 +3,7 @@ title: Recommended Android apps
date: 2019-01-07 00:00:00 date: 2019-01-07 00:00:00
lastUpdated: 2019-02-05 00:00:00 lastUpdated: 2019-02-05 00:00:00
tags: tags:
- 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. 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.
@ -24,4 +25,4 @@ Name | Previous | Comment
[Unit Converter Ultimate](https://github.com/physphil/UnitConverterUltimate) | | The only unit converter app that you would ever need. Supports every practically possible units including currency. [Unit Converter Ultimate](https://github.com/physphil/UnitConverterUltimate) | | The only unit converter app that you would ever need. Supports every practically possible units including currency.
[andOTP](https://github.com/andOTP/andOTP) | Google Authenticator | Open source and dark theme. [andOTP](https://github.com/andOTP/andOTP) | Google Authenticator | Open source and dark theme.
[Loyalty Card Keychain](https://f-droid.org/packages/protect.card_locker/) | Google Pay | Simply to store loyalty cards with barcode. [Loyalty Card Keychain](https://f-droid.org/packages/protect.card_locker/) | Google Pay | Simply to store loyalty cards with barcode.
OsmAnd, [Maps](https://f-droid.org/en/packages/com.github.axet.maps/)/MAPS.ME, Waze, HERE WeGo | Google Maps | ~~Google Maps doesn't work with microG.~~ (Edit: Google Maps v10.6.2 works again on microG v0.2.6.13280) [OsmAnd](https://github.com/osmandapp) or [MAPS.ME](https://github.com/mapsme/omim) which are open source and utilise [OpenStreetMap](https://www.openstreetmap.org/). *Maps* is a fork of MAPS.ME without the proprietary bits and it's available on F-Droid (https://f-droid.org/en/packages/com.github.axet.maps/). OsmAnd, [Maps](https://f-droid.org/en/packages/com.github.axet.maps/)/MAPS.ME, Waze, HERE WeGo | Google Maps | ~~Google Maps doesn't work with microG.~~ (Edit: Google Maps v10.6.2 works again on microG v0.2.6.13280) [OsmAnd](https://github.com/osmandapp) or [MAPS.ME](https://github.com/mapsme/omim) which are open source and utilise [OpenStreetMap](https://www.openstreetmap.org/). *Maps* is a fork of MAPS.ME without the proprietary bits and it's available on F-Droid (https://f-droid.org/en/packages/com.github.axet.maps/).

View File

@ -2,6 +2,8 @@
title: You should switch to these replacements of TrueCrypt/KeePassX/Adblock Plus title: You should switch to these replacements of TrueCrypt/KeePassX/Adblock Plus
date: 2019-01-15 00:00:00 date: 2019-01-15 00:00:00
tags: tags:
- Linux
- 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. 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.
@ -36,4 +38,4 @@ Software | Replacement | Comment
--- | --- --- | ---
MySQL | [MariaDB](https://mariadb.org/) MySQL | [MariaDB](https://mariadb.org/)
ownCloud | [Nextcloud](https://nextcloud.com/) ownCloud | [Nextcloud](https://nextcloud.com/)
Apache/nginx | [Caddy](https://caddyserver.com/) | It's not a direct replacement, rather a web server that prioritise secure-by-default. Apache/nginx | [Caddy](https://caddyserver.com/) | It's not a direct replacement, rather a web server that prioritise secure-by-default.

View File

@ -2,6 +2,7 @@
title: Running locally installed node packages title: Running locally installed node packages
date: 2018-10-24 00:00:00 date: 2018-10-24 00:00:00
tags: tags:
- Node
--- ---
Installing a package with `--global` introduce more trouble than convenience. Here's how to run binaries of locally installed node packages. Installing a package with `--global` introduce more trouble than convenience. Here's how to run binaries of locally installed node packages.
@ -55,4 +56,4 @@ Running `npm run test` would execute `snyk auth $SNYK_TOKEN && snyk protect && s
So, back to the Hexo example, you *could* put its most common operations like `hexo new post`, `hexo clean`, `hexo generate` or `hexo server` into the "scripts" section, and then `npm run [name]`. So, back to the Hexo example, you *could* put its most common operations like `hexo new post`, `hexo clean`, `hexo generate` or `hexo server` into the "scripts" section, and then `npm run [name]`.
Source: [[1]](https://firstdoit.com/no-need-for-globals-using-npm-dependencies-in-npm-scripts-3dfb478908?gi=850cae7e854e), [[2]](http://2ality.com/2016/01/locally-installed-npm-executables.html) Source: [[1]](https://firstdoit.com/no-need-for-globals-using-npm-dependencies-in-npm-scripts-3dfb478908?gi=850cae7e854e), [[2]](http://2ality.com/2016/01/locally-installed-npm-executables.html)

View File

@ -3,6 +3,9 @@ title: Secure node modules with Snyk
date: 2018-10-01 00:00:00 date: 2018-10-01 00:00:00
lastUpdated: 2018-10-30 00:00:00 lastUpdated: 2018-10-30 00:00:00
tags: tags:
- Node
- Snyk
- Security
--- ---
## Intro ## Intro
> Click [here](#installation) to go straight to installation guide. > Click [here](#installation) to go straight to installation guide.

View File

@ -2,7 +2,12 @@
title: Snyk failed to patch in Alpine docker title: Snyk failed to patch in Alpine docker
date: 2018-10-31 00:00:00 date: 2018-10-31 00:00:00
tags: tags:
- Snyk
- Linux
- Security
- Alpine
--- ---
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.
<!-- more --> <!-- more -->
@ -15,4 +20,4 @@ Snyk only tells modules failed to patch, which is not helpful at all. I initiall
The issue was only pinpointed after I ran snyk with `--debug`, which I should've used it in the first place anyway. The issue is due to BusyBox's patch doesn't support `--backup` option. Sigh, {% post_link gnu-vs-busybox-tools 'BusyBox versus GNU' %}, back at it again. The issue was only pinpointed after I ran snyk with `--debug`, which I should've used it in the first place anyway. The issue is due to BusyBox's patch doesn't support `--backup` option. Sigh, {% post_link gnu-vs-busybox-tools 'BusyBox versus GNU' %}, back at it again.
To install GNU's patch, simply add `apk add patch` before `npm install` in your CI config (e.g. `.gitlab-ci.yml`). The installation will automatically replace the BusyBox's patch symlink, so you don't need to. To install GNU's patch, simply add `apk add patch` before `npm install` in your CI config (e.g. `.gitlab-ci.yml`). The installation will automatically replace the BusyBox's patch symlink, so you don't need to.

View File

@ -2,6 +2,7 @@
title: Change spellcheck language in Ghostwriter title: Change spellcheck language in Ghostwriter
date: 2018-10-14 00:00:00 date: 2018-10-14 00:00:00
tags: tags:
- Markdown
--- ---
Ghostwriter is a Markdown editor with html preview. Previously I used [StackEdit](https://stackedit.io/app), but it's web-based. Ghostwriter is a Markdown editor with html preview. Previously I used [StackEdit](https://stackedit.io/app), but it's web-based.

View File

@ -1,7 +1,8 @@
--- ---
title: Which statistical test should I use? title: Which statistical test should I use?
date: 2019-02-09 00:00:00 date: 2019-02-09 00:00:00
tags: stats tags:
- 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. Following are the guides (or rather cheat sheets) that I have gathered so far.

View File

@ -2,6 +2,7 @@
title: Use Unix line endings in Unix tools title: Use Unix line endings in Unix tools
date: 2018-11-08 00:00:00 date: 2018-11-08 00:00:00
tags: tags:
- 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](https://en.wikipedia.org/wiki/Newline#Representation).
@ -33,4 +34,4 @@ cat input | dos2unix > output
dos2unix filename dos2unix filename
``` ```
If your distro includes BusyBox (e.g. Ubuntu), use `busybox dos2unix`. If your distro includes BusyBox (e.g. Ubuntu), use `busybox dos2unix`.

View File

@ -2,6 +2,7 @@
title: How to check validity of GitLab CI config title: How to check validity of GitLab CI config
date: 2018-10-25 00:00:00 date: 2018-10-25 00:00:00
tags: tags:
- GitLab
--- ---
It can be frustrating after you push the changes you made to `.gitlab-ci.yml`, only to discover it's invalid on gitlab.com. Here's how to verify/lint the config. It can be frustrating after you push the changes you made to `.gitlab-ci.yml`, only to discover it's invalid on gitlab.com. Here's how to verify/lint the config.
@ -21,4 +22,4 @@ This is what it looks like,
{% cloudinary 20181025/lint.png %} {% cloudinary 20181025/lint.png %}
Simply paste the content of your `.gitlab-ci.yml` and 'Validate'. Simply paste the content of your `.gitlab-ci.yml` and 'Validate'.

View File

@ -2,6 +2,8 @@
title: Prevent word break in array question on LimeSurvey title: Prevent word break in array question on LimeSurvey
date: 2018-10-31 00:00:00 date: 2018-10-31 00:00:00
tags: tags:
- Stats
- 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.
@ -47,4 +49,4 @@ Here's how to prevent word break.
Once the word break is disabled, array answers should look like this, Once the word break is disabled, array answers should look like this,
{% cloudinary 20181031/no-break-word %} {% cloudinary 20181031/no-break-word %}