This file contains 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
# WSL1 | |
alias www='https_proxy="http://127.0.0.1:8080" http_proxy="http://127.0.0.1:8080"' | |
# or simply | |
export https_proxy="http://127.0.0.1:8080" | |
export http_proxy="http://127.0.0.1:8080" |
This file contains 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
# WSL2 | |
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }') | |
alias www="https_proxy=\"http://${hostip}:8080\" http_proxy=\"http://${hostip}:8080\"" | |
# or set it global | |
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }') | |
export https_proxy="http://${hostip}:8080" | |
export http_proxy="http://${hostip}:8080" |
This file contains 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 | |
# config file to prevent duplicate download | |
DIR="/home/$(whoami)/.config/dnasa" | |
FILE="${DIR}/date.txt" | |
NASA='https://apod.nasa.gov/apod/' | |
HOMEPAGE="${NASA}astropix.html" | |
# change it to /tmp if you dont want to keep the picture |