Since company projects require using internal Maven resources, which aren’t needed at home, switching settings back and forth is time-consuming. Inspired by automation, I considered creating a script to switch sources.

Script-Based Initial Solution

I came across an article by a fellow developer about script-based switching, which gave me an idea. Here’s the script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

base_dir=~/.m2
setting_home=settings_home.xml
setting_work=settings_work.xml

PS3='Please enter the number of your choice: '
options=("home" "work")
select opt in "${options[@]}"
do
case $opt in
"home")
ln -sfn ${base_dir}/${setting_home} ${base_dir}/settings.xml
echo "Switched setting.xml to home!"
break
;;
"work")
ln -sfn ${base_dir}/${setting_work} ${base_dir}/settings.xml
echo "Switched setting.xml to work!"
break
;;

esac
done

The script allows interactive execution to switch settings. However, this method still requires running the script each time. Is there a way to achieve one-click switching? Yes! Alfred can do it.

Read more »

I have spent some time to check my personal Mac Apps, so provide a list for the references.

Will keep updating

Notes

  1. Some are paid apps, but there are also many free and open-source options. Ultimately, the value of an app is in its output. These apps have significantly helped my work/life, and they are worth the purchase.
  2. In order to save money, for some paid apps, I use open-source licenses.
  3. If you can afford it, suggest to buy and support the official versions.
  4. The list is periodically updated, so some apps may be replaced.
  5. When constantly choosing and refining apps, I have one feeling: apps to us are like swords to a swordsmen. It’s not about the quantity but about being handy and sharp. So, choose the ones that suit you best, learn them deeply, and ultimately improve your efficiency, making work and life better.
Read more »

I’ve been using Alfred for several years and believe it is a powerful tool. I summarize my most used features for your reference and perhaps to help the follower.

Alfred is my primary entry for searching and querying on my Mac. Every operation I perform start from this single input box.

Instructions

The following tutorial applies to Alfred 4/5

let’s start!

Read more »

Recently, while working on a project, I saw experts using shortcuts with incredible efficiency. Their proficiency was awe-inspiring, highlighting the gap between us. While you’re still slowly moving your mouse, the expert might have already switched between numerous files and executed several actions efficiently. This gap in efficiency multiplies over time. Seeing this gap has motivated me to start mastering various common shortcuts. Here, I record them for my reference and perhaps to help others.

Disclaimer

  • Since I am a Mac user and a Developer, the software and skills covered here are focused accordingly.
  • Some shortcuts are marked with * indicating that they are custom settings, not software defaults, and are for reference only.
  • The operational techniques must also be continually adjusted and enriched in practice, so this document will be continuously updated.
  • I set the F media keys as function keys, so low-frequency media key operations require Fn, but other high-frequency operations become simpler.

Mac Keyboard Symbols

Read more »

Recently, I have gotten into the habit of setting aside work during weekends and after hours to read fundamental books, read articles, and reflect.

Looking back on my four years of development, I have the following insights.

  • Know the whole picture, and work on the details.

  • Open every pore to absorb external knowledge.

  • There is always a reason for popularity; stay open-minded.

  • At work, if you don’t progress, you regress.

  • Official documentation is the primary source; chew it thoroughly.

At the end

As Lao Luo said, “Life goes on; the hustle never stops.” Keep pushing forward.

Read more »
0%