feat: add more alt attributes

* fix grammar, clarify
This commit is contained in:
curben 2019-05-24 14:56:08 +09:30
parent 809e3e05ab
commit 2000d449c6
8 changed files with 37 additions and 23 deletions

View File

@ -5,12 +5,14 @@ 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.
<!-- more -->
Caja is a file manager originally forked from Nautilus. It's used in MATE desktop environment, found in Ubuntu MATE or Linux Mint. Since it shares similar base with Nautilus, following guide also applies to Nautilus too (I haven't tested it though).
The side pane of Caja shows many media folders by default. You might not have all the media types or not important enough to bookmark it.
{% cloudinary 20181002/caja-side-pane.png %}
{% cloudinary '20181002/caja-side-pane.png' 'Side pane view of Caja file manager' %}
*from github [issue](https://github.com/mate-desktop/caja/issues/480).*
You can hide some folder through `~/.config/user-dirs.dirs` or `/home/your-username/.config/user-dirs.dirs` (you need to show hidden file/folder if you're going to browse through Caja).
@ -27,6 +29,6 @@ XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
```
To hide the Videos folder, simply edit the line to `XDG_VIDEOS_DIR="$HOME"`. Repeat this for other folders, **except** for Desktop folder. If you hide the Desktop folder, all folders in Home will show up on the desktop.
To hide the Videos folder, simply edit the line to `XDG_VIDEOS_DIR="$HOME"`. Repeat this for other folders, **except** for the Desktop folder. If you hide the Desktop folder, all folders in Home will show up on the desktop.
Re-launch Caja. Those folders will show up under Bookmarks, instead of Computer. Hide them by right click > Remove.

View File

@ -5,8 +5,11 @@ lastUpdated: 2019-03-01
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.
<!-- more -->
## Stop uninstalled games from returning
Stop included games like Candy Crush and Minecraft to reappear after you remove them.

View File

@ -5,14 +5,17 @@ lastUpdated: 2018-10-06
tags:
- Hexo
---
Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth.
<!-- more -->
# Minify
[Minify](https://en.wikipedia.org/wiki/Minification_(programming)) html, css and js to remove characters that are not required for the code to function. This process involves removing white space/tab, line break and comments. I read somewhere that Google saves gigabytes of bandwidth just by removing line break, which surprised me how much line break alone costs when you have the popularity of Google.com.
[Minify](https://en.wikipedia.org/wiki/Minification_(programming)) html, css, js and svg to remove characters that are not required for the code to function. This process involves removing white space/tab, line break and comments. I read somewhere that Google saves gigabytes of bandwidth just by removing line break, which surprised me how much line break alone costs when you have the popularity of Google.com.
In Hexo, there are two approaches.
### hexo-all-minifier
1. The easiest way is using hexo-all-minifier. Unlike others, this plugin also compress images as well. To use it, simply run the following command in your hexo folder:
1. The easiest way is using hexo-all-minifier. Unlike most, this plugin also compress images as well. To use it, simply run the following command in your hexo folder:
``` bash
$ npm install hexo-all-minifier --save
```
@ -24,9 +27,9 @@ In Hexo, there are two approaches.
To see this in action, check out this [job log](https://gitlab.com/curben/blog/-/jobs/101703188). As you can see, the resulting files are around 20% smaller. However, do note that its image compression dependencies have some [vulnerabilities](https://snyk.io/test/npm/hexo-all-minifier). This can be patched using [Snyk](https://snyk.io/).
### hexo-yam
Despite the convenience of hexo-all-minifier, I don't use it due to the vulnerability. I don't need its image compression since the [Cloudinary](https://cloudinary.com/) image hosting offers [auto compression](https://cloudinary.com/documentation/responsive_images#responsive_images_with_automatic_quality_selection).
Despite the convenience of hexo-all-minifier, I don't use it due to potential vulnerability. I don't need its image compression since the image hosting I'm currently using, [Cloudinary](https://cloudinary.com/), offers [auto compression](https://cloudinary.com/documentation/responsive_images#responsive_images_with_automatic_quality_selection).
Thus, I switch to leaner hexo-yam. To use it, simply run the following command in your hexo folder:
So, I switch to a leaner plugin, [hexo-yam](https://github.com/weyusi/hexo-yam). To use it, simply run the following command in your hexo folder:
``` bash
$ npm install hexo-yam --save
```
@ -43,5 +46,5 @@ and deploy.
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir brotli -f --keep {} \;
```
3. If you use CI like `.gitlab-ci.yml` or `.travis.yml`, simply add the above command under `script:`, next line after `hexo deploy`.
3. If you use CI like `.gitlab-ci.yml` or `.travis.yml`, simply add the above command under `script:`, after `hexo generate`.
4. Deploy.

View File

@ -12,13 +12,13 @@ TrueCrypt and KeePassX have been discontinued while Adblock Plus has been [comme
## VeraCrypt
{% cloudinary 20190115/veracrypt.png %}
{% cloudinary '20190115/veracrypt.png' 'Screenshot of VeraCrypt' %}
VeraCrypt is a fork of the discontinued [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt). It includes security improvements and fixes over the original—for example using much higher iterations (327,661-655,331 vs 1,000-2,000) to generate the header key—to make brute force more costly. This improvement along with supporting more ciphers and their combinations, means its storage format is incompatible to the original's. User still has the option to open TrueCrypt volume and (optionally, but recommended) convert it to VeraCrypt format.
## KeePassXC
{% cloudinary 20190115/keepassxc.png %}
{% cloudinary '20190115/keepassxc.png' 'Screenshot of KeePassXC' %}
KeePassXC is a fork of the discontinued [KeePassX](https://www.keepassx.org/). KeePassX started out as a Linux port of (previously Windows-only) KeePass. While both eventually become cross-platform, I stick with KeePassX (even on Windows) for being lighter and quicker to launch. The [Mono](https://www.mono-project.com/)-developed KeePass—like Java—makes it not quite as native as Qt-developed KeePass, thus feels slower on Linux. It last [released](https://www.keepassx.org/news/2016/10/609) in October 2016 with no further update since then.
@ -26,7 +26,7 @@ Notable [improvements](https://keepassxc.org/project/) of KeePassXC including KD
## uBlock Origin
{% cloudinary 20190115/ubo.png %}
{% cloudinary '20190115/ubo.png' 'Screenshot of uBlock Origin' %}
uBlock Origin (uBO) is a popular ad blocker well-known for its low memory and CPU usage (compared to other ad blockers). The [dynamic filtering](https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-quick-guide) allows granular control over filtering rules. It supports HOSTS syntax for blocking malicious websites. I created a [blocklist](https://gitlab.com/curben/urlhaus-filter) based on the Abuse.sh [URLhaus](https://urlhaus.abuse.ch/).

View File

@ -7,6 +7,11 @@ tags:
- Snyk
- Security
---
The package dependency on Node can cause security issue. Here's how to use Snyk to mitigate it.
<!-- more -->
## Intro
> Click [here](#Installation) to go straight to installation guide.
@ -36,7 +41,7 @@ Practically, you can use Snyk to patch it, *if* possible like this [hexo-all-min
1. [Sign up](https://app.snyk.io/signup) for a new Snyk account.
2. Snyk only supports [SSO](https://en.wikipedia.org/wiki/Single_sign-on), no e-mail sign up. You need to have GitHub, Bitbucket, or Google account. It can be a separate account from your current GitHub account. Linking your current GitHub repo to Snyk is *optional*.
3. Once you signed up, go to your account setting, grab the API token and save it in your password manager (or somewhere safe).
{% cloudinary 20181001/snyk-api.png %}
{% cloudinary '20181001/snyk-api.png' 'Snyk API token' %}
4. Install Snyk,
```bash
$ npm install snyk
@ -62,6 +67,6 @@ $ echo 'PATH="$PATH:./node_modules/.bin"' >> ~/.profile
Alternatively, you could integrate directly to your remote repo (github/gitlab). This integration allows Snyk to automatically create pull/merge request. Enable this by going to your Snyk account and Integrations tab.
{% cloudinary 20181001/snyk-integration.png %}
{% cloudinary '20181001/snyk-integration.png' 'Available integrations offered by Snyk' %}
More info: [NodeJS](https://snyk.io/docs/snyk-for-nodejs), [GitHub](https://snyk.io/docs/github), [GitLab](https://snyk.io/docs/gitlab)

View File

@ -13,19 +13,19 @@ Note: The previews are displayed in dark theme, but hi-res downloads are in ligh
## Parametric and non-parametric tests
{% cloudinary 20190209/parametric-non-parametric-preview.png %}
{% cloudinary '20190209/parametric-non-parametric-preview.png' 'Common parametric and non-parametric tests' %}
**Download:** [PDF](https://mega.nz/#!3F81WarB!9aBojWuS6S4_8azMSFdy5ug3UDqCt3UHCKFr77Wpkg0) | [DOCX](https://mega.nz/#!nB9zgCiA!hHHtI-MELou9xVq1dMpkJeE2edXogkP1kEnxE1gr-84)
## Flowchart
{% cloudinary 20190209/statistical-test-flowchart-preview.png %}
{% cloudinary '20190209/statistical-test-flowchart-preview.png' 'Choose a statistical test using a flowchart' %}
**Download:** [PDF](https://mega.nz/#!CV8DAYaD!r9NaOEZ4VfeF-peNQm7jbEP6MqO4mRIBsRiHBd2DgsU) | [PNG](https://mega.nz/#!fc9H2KbS!LDp8FmX2W46d58zjIgItZiYDEkmnwkza6EbBxtDSl2g) | [VSDX](https://mega.nz/#!GM0jyKRQ!CEaKcoNBlYmT3bTmEgdatWAkshteinDeby5_FVYcHu8)
## Table
{% cloudinary 20190209/statistical-tests-table-preview.png %}
{% cloudinary '20190209/statistical-tests-table-preview.png' 'Statistical tests in a table view' %}
**Download:** [PDF](https://mega.nz/#!KN0jjaoS!cqr4sXCabLuD7jIs1GDGUuNrZP0okYRck24-V5QpS8U) | [DOCX](https://mega.nz/#!vV1TXaBb!Rq6x3--CRizMLCJFJ4wgADQmo-NPRMNERSIHeWSwW1o)
@ -33,6 +33,6 @@ Credit: James D. Leeper, Ph.D. (University of Alabama) [(Source)](https://statra
## Statistics mathematical symbols
{% cloudinary 20190209/statistics-mathematical-symbols-preview.png %}
{% cloudinary '20190209/statistics-mathematical-symbols-preview.png' 'Common mathematical symbols used in statistics' %}
**Download:** [PDF](https://mega.nz/#!Sc8hUISZ!B-j-ULD7CKDltjBYBRiX7_EPRe0P_YiUDmMzFBLlaEY) | [ODT](https://mega.nz/#!LA0XlAwa!FvU91TB43vgj7fLmNLTq_uMHlSGFHjB1EwVYuv8zlBQ)

View File

@ -4,7 +4,8 @@ date: 2018-10-25
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 later that it's invalid on gitlab.com. Here's how to verify/lint the config.
<!-- more -->
@ -20,6 +21,6 @@ https://gitlab.com/curben/blog/-/ci/lint
This is what it looks like,
{% cloudinary 20181025/lint.png %}
{% cloudinary '20181025/lint.png' 'Verify .gitlab-ci.yml online' %}
Simply paste the content of your `.gitlab-ci.yml` and 'Validate'.

View File

@ -11,7 +11,7 @@ In array type question, when you add many answer options, some words might break
When you have many answer options, the word can break into next line, like this:
{% cloudinary 20181031/break-word %}
{% cloudinary '20181031/break-word' 'Part of a word break into next line in LimeSurvey' %}
LimeSurvey does this to have consistent column width size across array question. Personally, I prefer not to have word break than fixed width.
@ -19,16 +19,16 @@ Here's how to prevent word break.
1. Go to the main admin page and then Themes.
{% cloudinary 20181031/theme-button %}
{% cloudinary '20181031/theme-button' 'LimeSurvey theme button in admin panel' %}
2. 'Extend' the theme of your choice. Choose a name of the new *extended* theme.
{% cloudinary 20181031/theme-list %}
{% cloudinary '20181031/theme-list' 'LimeSurvey theme list' %}
3. It will redirect you to 'Theme editor' page.
4. Go to 'custom.css'.
{% cloudinary 20181031/custom-css %}
{% cloudinary '20181031/custom-css' 'Customise LimeSurvey theme through custom.css' %}
5. Paste the following css,
@ -49,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 %}
{% cloudinary '20181031/no-break-word' 'No word break in LimeSurvey' %}