Friday, March 8, 2024
How to format alternate rows with different background colors in LibreOffice Calc?
Saturday, February 3, 2024
How to reference the previous string in Zsh command-line
Friday, October 13, 2023
xdotool workaround for opening an email in conversation view in thunderbird 115.3.1
With a recent update of Thunderbird, I've noticed that when I open an
email with conversation view (with Ctrol+Shift+O), the messages are
not
properly sorted anymore. I had to click the sort-by-date menu and
sort-by-thread menu, respectively, every time.
I've written a script to automate that boring process as you can see below.
#!/usr/bin/bash
xdotool mousemove 500 500
xdotool click 1
xdotool key ctrl+shift+o
sleep 1
xdotool key --delay 100 alt+v s e
sleep 1
xdotool key ctrl+shift+o
sleep 1
xdotool key --delay 100 alt+v s t
sleep 1
xdotool key 0x002a
xdotool mousemove 500 335
I store this script in dom0 and name it xdo-thread. I map this script
with F5 key. Now, every time I want to see the messages in
conversation
view, I simply press F5.
There's one tricky part I'd like to point out. The line "xdotool
click 1" is a trick. Without it, we can't use "xdotool key". I'm not
sure what the reason is yet. Maybe it's about window focus.
Sunday, July 9, 2023
High-speed trains
Thursday, June 8, 2023
I loved BG
by Langston HughesI loved my friend.
He went away from me.
There’s nothing more to say.
The poem ends,
Soft as it began—
I loved my friend.
by ... I loved my friend.
BG went away from me.
There’s nothing more to say.
The poem ends,
Soft as it began—
I loved my BG.
How to record video without sound on Android?
Line Camera + Samsung's Screen Recording (without Sound)
Thursday, May 11, 2023
Was life really better?
\begin{document}
\maketitle
People often talk about how life was better in the `good old days', but
how true is that? Let's look into my views of life before and after the
smartphone era.
Life was absolutely different when there was no smartphone. Your bosses
and co-workers could not easily reach out to you via instant messaging
apps after work hours or while on holidays. If they really needed to
contact you, they had to give you a call. Giving someone a call means
that it has to be a matter of utmost importance. This helped filtering
out less important or disorganized matters from reaching out to us.
Moreover, even within work hours, allowing other people to text you any
time they wish is a great distraction at work which reduces productivity
tremendously. Every time we get distracted by someone, involuntarily,
while we are working on something, it will take an average of 23 minutes
and 15 seconds to refocus \cite{lastoe20}. In order to circumvent this
problem, some companies allow each employee to set his/her own
workplace-distraction-hours. Anyone who needs to talk to another person
has to check his/her schedule first.
However, I agree that there are many benefits that come with smartphone.
Things such as Duolingo, a language learning app, which allows us to
learn new languages at any time and places we want, or Google Maps,
which makes it extremely easy to travel without having to give too much
effort into planning, are really useful.
In conclusion, there are countless benefits we can get from smartphone,
but we have to be aware of the pitfalls that come with it.
\begin{thebibliography}{10}
\bibitem{lim23} Alex Lim et al,
\textit{Constant companion: Our lives with mobile phones
https://www.straitstimes.com/multimedia/graphics/2023/05/mobile-phones-singapore/},
The Straits Times,
10\textsuperscript{th} May 2023.
\bibitem{fried18} Jason Fried et al,
\textit{It Doesn't Have to Be Crazy at Work},
Harper Business,
2\textsuperscript{nd} October 2018.
\bibitem{lastoe20} Stacey Lastoe,
\textit{https://www.themuse.com/advice/this-is-nuts-it-takes-nearly-30-minutes-to-refocus-after-you-get-distracted},
TheMuse.com,
19\textsuperscript{th} June 2020.
\end{thebibliography}
\end{document}