Skip to content

Instantly share code, notes, and snippets.

View coltenkrauter's full-sized avatar
🔥
Fire

Colten Krauter coltenkrauter

🔥
Fire
  • Stevensville, MT
View GitHub Profile
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 30, 2024 09:07
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@coltenkrauter
coltenkrauter / README.md
Last active April 3, 2024 12:04
Toggle Airport: Disable Wi-Fi when connected to ethernet

toggle-airport

Code for disabling Wi-Fi when docking (connecting an ethernet adapter) and enabling Wi-Fi when disconnecting from ethernet.

I am using MacBook Pro 15'' with macOS Catalina.

Quick start

  1. Put toggleAirport.sh in the correct location with the right permissions (see comment at the top of the file)
  2. Put com.mine.toggleairport.plist in the correct location with the right permissions (see comment at the top of the file)
@coltenkrauter
coltenkrauter / 35-free-apis-curated-by-chatgpt.md
Last active March 15, 2024 16:37
A compilation of 35 APIs spanning various categories including general utility, advanced features, and including niche ones. Curated with the help of ChatGPT.

35 Free APIs Curated by ChatGPT-4

Hey, tech enthusiasts! Ever been in the middle of a project and thought, "I wish there was an API for that?" Well, you're in luck! I've sifted through the digital realm to bring you a compilation of 35 APIs, each offering unique functionalities that can be the missing piece in your tech puzzle. Whether you're just starting your coding journey or are a seasoned developer, this list promises something for everyone. And here's a fun twist: this isn't just my brainchild. I had a little help from ChatGPT by OpenAI. Yep, AI-driven insights went into this, giving it that extra touch of tech awesomeness. Ready to dive in? Let's explore!

General Utility APIs

  1. JSONPlaceholder
    Fake online REST API perfect for testing and prototyping. Developers can use it for mockup data without setting up a backend.

  2. Dog API

@coltenkrauter
coltenkrauter / hulu-vpn-whitelist.md
Last active March 13, 2024 20:08
Whitelist Hulu to bypass VPN

Whitelist Hulu to bypass VPN

assetshuluimcom-a.akamaihd.net
cws.conviva.com
hulu.hb-api.omtrdc.net
hulu.com
assets.huluim.com
t2.hulu.com


@coltenkrauter
coltenkrauter / html-input-remove-chrome-autofill-background.css
Last active February 6, 2024 19:38
Remove Chrome's autofill background color on HTML inputs. This unique solution makes the background color to transparent rather then a solid color.
// Remove chrome autofill color from inputs
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000000s ease-in-out 0s;
}
# Credit: https://stackoverflow.com/questions/2781549/removing-input-background-colour-for-chrome-autocomplete#answer-29350537
@coltenkrauter
coltenkrauter / docker-compose.yaml
Last active January 25, 2024 19:46
Traefik V2 Docker Compose file with LetsEncrypt and HTTPS redirect - Traefik dashboard and simple whoami service
# Tutorial: https://blog.creekorful.com/2020/01/how-to-expose-traefik-2-dashboard-securely-docker-swarm/
version: '3'
services:
reverse-proxy:
image: traefik:2.3
command:
# - '--log.level=DEBUG'
- '--api=true'
- '--api.dashboard=true'
@coltenkrauter
coltenkrauter / nginx.conf
Created January 23, 2021 21:36
Nginx configuration for SPAs (Single page applications) such as React or Angular
# https://www.zeolearn.com/magazine/setting-caching-headers-for-a-spa-in-nginx-cache
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
# X-Frame-Options is to prevent from clickJacking attack
add_header X-Frame-Options SAMEORIGIN;
@coltenkrauter
coltenkrauter / prime-vpn-whitelist.md
Last active December 30, 2023 17:47
Whitelist Amazon Prime to bypass VPN

Whitelist Amazon Prime to bypass VPN

amazon.com
media-amazon.com
amazonvideo.com
aiv-cdn.net
pv-cdn.net
aiv-delivery.net
akamaihd.net
ssl-images-amazon.com

@coltenkrauter
coltenkrauter / canon-camera-dat-file-issue.md
Created September 29, 2023 03:20
A guide that explains the DAT file issue in Canon cameras, including the Vixia HFG50, and how to fix it.