Skip to content

Instantly share code, notes, and snippets.

@jkotrba
jkotrba / fix-wsl2-dns-resolution
Created March 15, 2024 16:37 — forked from coltenkrauter/fix-wsl2-dns-resolution.md
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.
@jkotrba
jkotrba / 35-free-apis-curated-by-chatgpt.md
Created March 15, 2024 16:37 — forked from coltenkrauter/35-free-apis-curated-by-chatgpt.md
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

@jkotrba
jkotrba / vpn_connection.scpt
Last active September 11, 2015 17:52 — forked from adgedenkers/vpn_connection.scpt
Toggle Connection to VPN on a Mac via AppleScript
tell application "System Events"
-- get current clipboard contents as a string
set CurrentClipboard to the clipboard as string
-- set the clipboad to your password
set the clipboard to "Y0urVPNPa$$w0rd"
-- start playing with the VPN
tell current location of network preferences
@jkotrba
jkotrba / transcode-video.sh
Last active August 27, 2015 03:23 — forked from lisamelton/transcode-video.sh
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015