Skip to content

Instantly share code, notes, and snippets.

View gingerscallion's full-sized avatar

CC gingerscallion

View GitHub Profile
@gingerscallion
gingerscallion / .zshrc
Last active October 15, 2020 14:30
Proxy Settings for WSL1
# 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"
@gingerscallion
gingerscallion / .zshrc
Last active January 19, 2022 08:08
Proxy Settings for WSL2
# 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"
@gingerscallion
gingerscallion / daily-nasa.sh
Last active October 16, 2020 04:27
Download today's astronomy picture from NASA
#!/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