Background
My churches are going green.
Problem
→ I downloaded a PDF from Haute-Garonne’s government site, filled in the form and saved it on a USB key. Then I printed it at a Konica Minolta bizhub photocopier .
However, _only_ the radio buttons and checkboxes were printed. The blanks were left _blank_! I opened my PDF and double-checked that I had input the text in .
Printed output
Printed by a Konica Monilta bizhub photocopier
[Read More]Flying Grizzly's HTML Form Submission Error
Filling in hidden missing fields
Problem
I would like to submit Flying Grizzly’s form. I filled in every
blanks and then I clicked the “submit” button below. I was greeted with a
MISSING_REQUIRED_FIELDS error within a second.
{
"success":false,
"data":["replying_to"],
"rawError":{
"_smErrorCode":"MISSING_REQUIRED_FIELDS",
"data":["replying_to"]
},
"errorCode":"MISSING_REQUIRED_FIELDS"
}Discussion
The error code suggested that the form fields sent should be inspected.
[Read More]Beautiful Hugo Improvements
Some bug fixes, Font Awesome 5, and more ...
Fixed issue #142
Two weeks ago, Google Webmasters complained about the broken urls in this blog’s Tags page. This was reported by Joakim Vivas as issue #142 half a year ago. Pascal had submitted pull request #165 to fix this. However, he self-closed his PR.
Since the last commit by Michael Romero, Beautiful Hugo’s owner, was five months ago, it seems that he has abandonned his project. Therefore, I used Kaushal Modi’s solution to fix this at commit ff536782.
[Read More]CJK on Ubuntu 18.04
Support multilingualism on Linux and become plurilingual
Goal
To enable Chinese and Japanese input on (X)ubuntu 18.04 laptops .
My choices of input method
| old | new | |
|---|---|---|
| OS | Xubuntu 18.04 | Ubuntu 18.04 |
| Desktop Environment | Xfce | GNOME |
| Input method | Fcitx | IBus |
| Language | Method |
|---|---|
| 中文 | Rime |
| 日本語 | Mozc |
On my old Fujitsu laptop running Xubuntu, I’ve chosen Fcitx. This turns out to be a difficult choice when I install Rime.
Japanese input
Thanks to ひゃまだ, I’ve managed to switch between difference modes in Mozc.
[Read More]Zsh and NPM Setup on Ubuntu
Automate settings with Oh My Zsh
Problem
After installing NPM throught Ubuntu’s default apt-get manager, I got
permission errors. Though sudo can solve the problem, that’s not
the right way in principle because NPM is supposed to hold different versions of
Node.js packages for testing. It’s insecure to execute npm with sudo
priviledges.
Solutions
-
Install Zsh to improve efficiency
-
Grab Oh My Zsh to instal NVM as its plugin.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" -
Use NVM (NPM Version Manager) to manage NPM.
[Read More]
Towards Better File Management
Use git-annex like your local library
Background: 🈶 ⛪ → 🌿
→ 📧 In the recent decade, organizations are replacing courrier with email. The reason is two-folded. 🌿 First, the later is more environmentally-friendly. 📨 Second, the later delivers the content to the recipient quick as a flash.
📧 📎 When one sends an email, one sometimes wants to attach a file to an email. If one has to sign a paper document and send it by email, then one will probably need a scanner. (Despite the emergence of scanning apps on mobile devices, the quality of a scanner is normally better since the page is flattened during the scan.)
[Read More]Laptop Battery Life
Avoid deep discharges
Main ideas
- – Ideal energy range for storage: 40%–80%
- The biggest enemy of electronic parts is heat .
- Avoid overchanging and unplug AC adapter when charging is complete. In particular, don’t leave a fully charged laptop connected to power supply. This can reduce the lifespan of the battery.
- Avoid deep discharges: recharge the laptop battery when its enery level drops to 40%.
- Reduce unnecessary programs running in background.
- If your hardware vendor supports Linux drivers for batteries, set the charging
thershold to 80%.
- Some Lenovo Thinkpads can benefit from those drivers.
- Other vendors like Fujitsu offers such drives for M$ Windows only.
External URLs
Missing Newline at EOL
Bash detection for dirty EOL and batch editing
Background
Despite my experience in Vim, the multi-cursor functionality in Sublime Text 3 has seduced my to change my editor.
Unlike Vim, a nonempty new line at the end of Sublime Text 3 file buffer causes the file to end without a newline character. In fact, it’s a POSIX standard to include a newline character at the EOL (end of file). (c.f. No Newline at End of File)
Problem
Unaware of the above POSIX standard and Sublime Text 3 convention, I have edited many lines of code in the repository for this blog and the one for my custom Beautiful Hugo. These edited files were almost everywhere in these repositories, and they polluted their remote counterparts on GitLab .
[Read More]CSB Theorem
A visual argument for CSB Theorem
This isn’t a substitute for books .
Reminder
- $A \preceq B$: $A$ can be “injected” into $B$.
- $A \sim B$: $A$ and $B$ share the same cardinality.
- $A \prec B$: $A$ can be “injected” into $B$, but it’s “smaller” than $B$.
- A finite set can be “counted” from one to some nonnegative integer.
- Infinite is the “antonym” of finite.
Wolf’s proof
When I first saw this proof in Robert S. Wolf’s Proof, Logic and Conjecture: The Mathematician’s Toolbox, I gave it up since it wasn’t as intuitive as the statement.
[Read More]Brighten Image With GIMP
Motivation
One loves adding colors to his/her life by adding stunning photos to his/her social media profile. However, due to various constraints, such as weather, budget and time, it’s possible that the photos taken look dark and somber.
Despite a suboptimal choice of camera angle, a right tool enables you to take the best out of the photo. Let’s go GIMPing.
[Read More]