-
Virtual machine based on Virtualbox, etc. is an overkill, generally speaking. It provides complete functionalities but is more CPU and memory hangry.
-
WSL 2 is the currently the best solution comes with Windows 10+. It is essentially a virtual machine but based on Hyper-V.
-
Cygwin, MobaXterm, etc. are outdated as …
Count Number of Fields in Each Line
Sometimes, a structured text file might be malformatted. A simple way to verify it is to count the number of fields in each line.
Using awk
You can count the number of fields in each line using the following awk command. Unfortunately, awk does not take escaped characters into consideration …
Resolve the DNS Contamination Issue in Firefox
The local DNS you use in China is probably contaminated
and popular sites like Google, Facebook, etc. are not interpreted correctly.
So if you are in China and use Firefox with Proxy,
make sure to set network.proxy.socks_remote_dns
to be true (follow steps below).
-
Open an empty tab in …
Convert a Socks Proxy to a HTTP Proxy
There are multiple tools available to convert a Socks proxy to a HTTP/HTTPS proxy. The work by convertting HTTP requests into socks requests and send them to the socks proxy. Be aware that this might not be necessary as many tools accepting HTTP/HTTPS proxies also accept socks proxies …
Quickly Create a Scala Project Using Gradle in Intellij IDEA
Easy Way
-
Create a directory (e.g.,
demo_proj
) for your project. -
Run
gradle init --type scala-library
in terminal in the above directory. -
Import the directory as a Gradle project in IntelliJ IDEA. Alternatively, you can add
apply plugin: 'idea'
intobuild.gradle
and then run the command./gradlew openIdea
to …
Visual Studio Code for Python
Extensions
Please refer to Useful Visual Studio Code Extensions .
Set Python Environment for Visual Studio Code Server
-
File -> Preference -> Settings
-
Click on Workspace.
-
Search for
Python Path
. -
Change Python Path to the one you want to use.