diff --git a/source/_posts/binaries-alpine-docker.md b/source/_posts/binaries-alpine-docker.md index ec27087..46f391e 100644 --- a/source/_posts/binaries-alpine-docker.md +++ b/source/_posts/binaries-alpine-docker.md @@ -2,6 +2,8 @@ title: Default binaries in Alpine docker image date: 2018-10-10 00:00:00 tags: +- Linux +- Alpine --- Here is the list of binaries shipped with the Docker image of Alpine Linux `alpine:3.8` diff --git a/source/_posts/disable-control-alt-s-mate-shortcut.md b/source/_posts/disable-control-alt-s-mate-shortcut.md index 259285f..25ebd2c 100644 --- a/source/_posts/disable-control-alt-s-mate-shortcut.md +++ b/source/_posts/disable-control-alt-s-mate-shortcut.md @@ -2,6 +2,7 @@ title: How to disable Control+Alt+S shortcut in MATE date: 2018-10-24 00:00:00 tags: +- Linux --- 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). -{% cloudinary 20181024/ccsm.png %} \ No newline at end of file +{% cloudinary 20181024/ccsm.png %} diff --git a/source/_posts/edit-multiple-questions-limesurvey.md b/source/_posts/edit-multiple-questions-limesurvey.md index e5571d4..11491fb 100644 --- a/source/_posts/edit-multiple-questions-limesurvey.md +++ b/source/_posts/edit-multiple-questions-limesurvey.md @@ -3,6 +3,8 @@ title: Edit multiple questions on LimeSurvey date: 2018-10-18 00:00:00 lastUpdated: 2018-10-26 00:00:00 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. @@ -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. -{% cloudinary 20181018/limesurvey-edit.png %} \ No newline at end of file +{% cloudinary 20181018/limesurvey-edit.png %} diff --git a/source/_posts/facebook-instagram-whatsapp-china.md b/source/_posts/facebook-instagram-whatsapp-china.md index 91f73dd..10f452b 100644 --- a/source/_posts/facebook-instagram-whatsapp-china.md +++ b/source/_posts/facebook-instagram-whatsapp-china.md @@ -3,6 +3,7 @@ title: Access Facebook/Instagram/Whatsapp/Google in China date: 2018-12-31 00:00:00 lastUpdated: 2019-01-13 00:00:00 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. @@ -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. -Anyhow, for best results with Algo, I recommend using multiple cloud providers in multiple locations, in case one of them is blocked. \ No newline at end of file +Anyhow, for best results with Algo, I recommend using multiple cloud providers in multiple locations, in case one of them is blocked. diff --git a/source/_posts/gnu-vs-busybox-tools.md b/source/_posts/gnu-vs-busybox-tools.md index 95c0f2c..73698cb 100644 --- a/source/_posts/gnu-vs-busybox-tools.md +++ b/source/_posts/gnu-vs-busybox-tools.md @@ -3,6 +3,8 @@ title: GNU vs BusyBox Unix tools date: 2018-10-13 00:00:00 lastUpdated: 2018-10-31 00:00:00 tags: +- Linux +- Alpine --- 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 -`. - **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//g' file` or `sed -e ':a' -e 'N' -e '$!ba' -e 's/\n//g' file`. GNU `sed -z 's/\n//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 -`. -- **patch**: BB doesn't support `--backup` option. BSD doesn't support `--verbose` option. \ No newline at end of file +- **patch**: BB doesn't support `--backup` option. BSD doesn't support `--verbose` option. diff --git a/source/_posts/hexo-blog-github.md b/source/_posts/hexo-blog-github.md index 13bd8b0..6aa2b8a 100644 --- a/source/_posts/hexo-blog-github.md +++ b/source/_posts/hexo-blog-github.md @@ -2,6 +2,7 @@ title: How to create a Hexo blog on GitHub Pages date: 2018-11-10 00:00:00 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/): diff --git a/source/_posts/hide-folders-caja-side-pane.md b/source/_posts/hide-folders-caja-side-pane.md index ffdbac5..e7d49e6 100644 --- a/source/_posts/hide-folders-caja-side-pane.md +++ b/source/_posts/hide-folders-caja-side-pane.md @@ -2,6 +2,7 @@ title: Hide folders of Caja side pane date: 2018-10-02 00:00:00 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. diff --git a/source/_posts/how-to-create-a-hexo-blog.md b/source/_posts/how-to-create-a-hexo-blog.md index 4e9892c..2540ee6 100644 --- a/source/_posts/how-to-create-a-hexo-blog.md +++ b/source/_posts/how-to-create-a-hexo-blog.md @@ -3,6 +3,8 @@ title: How to create a Hexo blog on GitLab Pages date: 2018-09-21 00:00:00 lastUpdated: 2018-11-10 00:00:00 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/). diff --git a/source/_posts/how-to-remove-windows-10-default-apps.md b/source/_posts/how-to-remove-windows-10-default-apps.md index b2bae93..95fad70 100644 --- a/source/_posts/how-to-remove-windows-10-default-apps.md +++ b/source/_posts/how-to-remove-windows-10-default-apps.md @@ -3,6 +3,7 @@ title: How to remove Windows 10 default apps date: 2018-09-26 00:00:00 lastUpdated: 2019-01-03 00:00:00 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. diff --git a/source/_posts/make-hexo-blog-smaller.md b/source/_posts/make-hexo-blog-smaller.md index 2e742a2..0c381ce 100644 --- a/source/_posts/make-hexo-blog-smaller.md +++ b/source/_posts/make-hexo-blog-smaller.md @@ -3,6 +3,7 @@ title: Make Hexo blog smaller date: 2018-09-28 00:00:00 lastUpdated: 2018-10-06 00:00:00 tags: +- Hexo --- Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth. diff --git a/source/_posts/make-pdf-files-smaller.md b/source/_posts/make-pdf-files-smaller.md index e16c23a..1661ed6 100644 --- a/source/_posts/make-pdf-files-smaller.md +++ b/source/_posts/make-pdf-files-smaller.md @@ -2,6 +2,7 @@ title: Make PDF files smaller date: 2019-01-05 00:00:00 tags: +- PDF --- The most effective ways of reducing the file size of a PDF is by converting to grayscale and reduce the resolution. diff --git a/source/_posts/microg-google-play-replacement.md b/source/_posts/microg-google-play-replacement.md index 2c912a1..f6dc0f0 100644 --- a/source/_posts/microg-google-play-replacement.md +++ b/source/_posts/microg-google-play-replacement.md @@ -3,6 +3,7 @@ title: microG, a replacement for the proprietary Google Play Services date: 2019-01-12 00:00:00 lastUpdated: 2019-02-05 00:00:00 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. @@ -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 **Issue**: A delay in receiving message -**Info**: Enable "Google Cloud Messaging" in microG Settings and allow relevant apps to register. \ No newline at end of file +**Info**: Enable "Google Cloud Messaging" in microG Settings and allow relevant apps to register. diff --git a/source/_posts/recommended-android-apps.md b/source/_posts/recommended-android-apps.md index 52b74c7..8489bd6 100644 --- a/source/_posts/recommended-android-apps.md +++ b/source/_posts/recommended-android-apps.md @@ -3,6 +3,7 @@ title: Recommended Android apps date: 2019-01-07 00:00:00 lastUpdated: 2019-02-05 00:00:00 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. @@ -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. [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. -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/). \ No newline at end of file +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/). diff --git a/source/_posts/replace-truecrypt-keepassx-adblock-plus.md b/source/_posts/replace-truecrypt-keepassx-adblock-plus.md index 7270d57..849da2f 100644 --- a/source/_posts/replace-truecrypt-keepassx-adblock-plus.md +++ b/source/_posts/replace-truecrypt-keepassx-adblock-plus.md @@ -2,6 +2,8 @@ title: You should switch to these replacements of TrueCrypt/KeePassX/Adblock Plus date: 2019-01-15 00:00:00 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. @@ -36,4 +38,4 @@ Software | Replacement | Comment --- | --- MySQL | [MariaDB](https://mariadb.org/) 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. \ No newline at end of file +Apache/nginx | [Caddy](https://caddyserver.com/) | It's not a direct replacement, rather a web server that prioritise secure-by-default. diff --git a/source/_posts/running-locally-installed-node-packages.md b/source/_posts/running-locally-installed-node-packages.md index cb4aa14..a2d4271 100644 --- a/source/_posts/running-locally-installed-node-packages.md +++ b/source/_posts/running-locally-installed-node-packages.md @@ -2,6 +2,7 @@ title: Running locally installed node packages date: 2018-10-24 00:00:00 tags: +- Node --- 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]`. -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) \ No newline at end of file +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) diff --git a/source/_posts/secure-node-modules-snyk.md b/source/_posts/secure-node-modules-snyk.md index ba5ce85..db1d9ca 100644 --- a/source/_posts/secure-node-modules-snyk.md +++ b/source/_posts/secure-node-modules-snyk.md @@ -3,6 +3,9 @@ title: Secure node modules with Snyk date: 2018-10-01 00:00:00 lastUpdated: 2018-10-30 00:00:00 tags: +- Node +- Snyk +- Security --- ## Intro > Click [here](#installation) to go straight to installation guide. diff --git a/source/_posts/snyk-patch-alpine-docker.md b/source/_posts/snyk-patch-alpine-docker.md index 000767e..b30f249 100644 --- a/source/_posts/snyk-patch-alpine-docker.md +++ b/source/_posts/snyk-patch-alpine-docker.md @@ -2,7 +2,12 @@ title: Snyk failed to patch in Alpine docker date: 2018-10-31 00:00:00 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. @@ -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. -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. \ No newline at end of file +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. diff --git a/source/_posts/spellcheck-language-ghostwriter.md b/source/_posts/spellcheck-language-ghostwriter.md index c06e6f4..3245478 100644 --- a/source/_posts/spellcheck-language-ghostwriter.md +++ b/source/_posts/spellcheck-language-ghostwriter.md @@ -2,6 +2,7 @@ title: Change spellcheck language in Ghostwriter date: 2018-10-14 00:00:00 tags: +- Markdown --- Ghostwriter is a Markdown editor with html preview. Previously I used [StackEdit](https://stackedit.io/app), but it's web-based. diff --git a/source/_posts/statistical-test.md b/source/_posts/statistical-test.md index b743fe1..02a0453 100644 --- a/source/_posts/statistical-test.md +++ b/source/_posts/statistical-test.md @@ -1,7 +1,8 @@ --- title: Which statistical test should I use? 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. diff --git a/source/_posts/unix-tools-line-endings.md b/source/_posts/unix-tools-line-endings.md index e7255f3..113dac3 100644 --- a/source/_posts/unix-tools-line-endings.md +++ b/source/_posts/unix-tools-line-endings.md @@ -2,6 +2,7 @@ title: Use Unix line endings in Unix tools date: 2018-11-08 00:00:00 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). @@ -33,4 +34,4 @@ cat input | dos2unix > output dos2unix filename ``` -If your distro includes BusyBox (e.g. Ubuntu), use `busybox dos2unix`. \ No newline at end of file +If your distro includes BusyBox (e.g. Ubuntu), use `busybox dos2unix`. diff --git a/source/_posts/validity-gitlab-ci-config.md b/source/_posts/validity-gitlab-ci-config.md index d35a23d..2704405 100644 --- a/source/_posts/validity-gitlab-ci-config.md +++ b/source/_posts/validity-gitlab-ci-config.md @@ -2,6 +2,7 @@ title: How to check validity of GitLab CI config date: 2018-10-25 00:00:00 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. @@ -21,4 +22,4 @@ This is what it looks like, {% cloudinary 20181025/lint.png %} -Simply paste the content of your `.gitlab-ci.yml` and 'Validate'. \ No newline at end of file +Simply paste the content of your `.gitlab-ci.yml` and 'Validate'. diff --git a/source/_posts/word-break-limesurvey.md b/source/_posts/word-break-limesurvey.md index 46e07d9..5094e2c 100644 --- a/source/_posts/word-break-limesurvey.md +++ b/source/_posts/word-break-limesurvey.md @@ -2,6 +2,8 @@ title: Prevent word break in array question on LimeSurvey date: 2018-10-31 00:00:00 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. @@ -47,4 +49,4 @@ Here's how to prevent word break. Once the word break is disabled, array answers should look like this, -{% cloudinary 20181031/no-break-word %} \ No newline at end of file +{% cloudinary 20181031/no-break-word %}