This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SRC_FOLDER="$1" | |
DST_FOLDER="$2" | |
if [[ -z "$SRC_FOLDER" || -z "$DST_FOLDER" ]]; then | |
echo "Usage: hardlink.sh <folder_or_file_name> <dest_folder>" | |
echo "e.g: hardlink.sh sample-folder nice-storage" | |
echo "Hard link will be created in nice-storage/sample-folder" | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] | |
chunk_three = chunk(arr, 3) | |
assert chunk_three == [["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"], ["j"]] | |
chunk_default = chunk(arr) | |
assert chunk_default == [["a", "b", "c", "d"], ["e", "f", "g", "h"], ["i", "j"]] | |
chunk_max = chunk(arr, 1000) | |
assert chunk_max == [['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] |
In PowerShell, run:
netsh interface portproxy add v4tov4 listenport=<host post> listenaddress=0.0.0.0 connectport=<wsl port> connectaddress=<wsl IP address>
e.g. forward port 8080 to port 8080
netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=8080 connectaddress=172.30.144.20
🔗 https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop
- Change directories into the temp folder:
cd /tmp
- Use wget to download it:
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- Get the current stable version:
sudo dpkg -i google-chrome-stable_current_amd64.deb
- Fix the package:
sudo apt install --fix-broken -y
Follow the instructions below to force all files to be checked out as LF, especially in Windows.
- Create
.gitattributes
file in the root directory of the project, if one does not exist. - Add the following line to the file
* text=auto eol=lf
- Run the following command to remove all Git caches (mind the trailing
.
, it indicates current path)
NewerOlder