-
Git: Restore a Commit with Reflog
git reset is generally used to cancel a commit. It happens mainly for two reasons. One is just to cancel it. The other is to modify changes. After changes, a new commit can be created. git commit --amend is an alternative way to modify it. Both ways can make the same result. ▶ git log --oneline a91929a (HEAD -> master)...
-
Bash: Highlight Matched Texts With Colors
Logs are valuable sources to identify issues. It would be continuously generated (e.g. adb logcat) or stored as a file. Mostly, I use the terminal to check those. When I check that, it is often not easy to see since every text has the same color. grep could help to filter out. With --color=auto or --color=always option, it supports highlighting...
-
Failing Unit Test by GeneratedSerializationConstructorAccessor1
For running Gradle tasks, I prefer using a command-line interface. Recently, I made a code change and added new unit tests. To verify the behavior, I ran a test task. Soon after, it showed a quite weird error message, which was about GeneratedSerializationConstructorAccessor1. As you can see below, the error message didn’t point out any line from my code. Everything...
-
Why ZSH is Slow for Git Repos
In these days, I’m using ZSH(https://ohmyz.sh/). It has many handy features and supports useful plugins. One day, I’ve noticed a slowness issue. Basically, the prompt was not shown right after running a command. It was interesting because it only happened in the git repositories. To fix this issue, I needed to understand what’s happening first. When you run zsh with...
-
How to Embed a Google Drive Video on a Website
There are lots of video sites you can upload your videos. After uploading, you can easily embed that video on your post or on a website. For example, YouTube supports “Copy embed code” option when you do the right-click. The copied code is like below. iframe tag is used to embed a video, and there are other parameters such as...
-
Adb: Take a Screenshot with a Laptop
When you use an Android emulator, taking a screenshot is quite easy. Just press the ‘Take screenshot’ on the sidebar or press the shortcut (For Mac, ⌘ + S). However, it is slightly cumbersome if you want to take a screenshot from your device and store that in your laptop. The reason is that you need to pull a screenshot...