Migrated notes from ncnotes

This commit is contained in:
2023-04-26 15:31:59 -04:00
parent e5bdf1648d
commit 88c8def207
2 changed files with 59 additions and 0 deletions

26
OpenVPN.md Normal file
View File

@@ -0,0 +1,26 @@
# HowTo: OpenVPN
## Installing OpenVPN Server on Ubuntu 20.04
I used the excellent all-in-one [OpenVPN Install](https://github.com/Nyr/openvpn-install) script to do the heavy lifting for this. There were a few caveats that weren't immediately apparent, mostly because of my ignorance in setting up OpenVPN.
I also made sure to open UDP port 1194 on the my Router/Modem and forward that port to Phaedrus
Afterwards, I was able to use the `ovpn` file to connect to my LAN
## Specifying a DNS with OpenVPN
After installing OpenVPN on a VM recently I decided I wanted it to use my local Pi-Hole instance as its DNS so I can block ads while connected to the VPN.
It's as easy as specifying the DNS in `/etc/openvpn/server/server.conf`, like so:
```ini
push "dhcp-option DNS 192.168.0.206"
```
Then restart openvpn with `sudo systemctl restart openvpn-server@server`
---
* [Setup OpenVPN Server - Pi Hole Reference](https://docs.pi-hole.net/guides/vpn/setup-openvpn-server/)
* The same guy that made the all-in-one script for OpenVPN made one for WireGuard: [wireguard-install](https://github.com/Nyr/wireguard-install)

33
youtube-dl Tricks.md Normal file
View File

@@ -0,0 +1,33 @@
# youtube-dl Tricks
youtube-dl is a free and open source download manager for video and audio from YouTube and over 1,000 other video hosting websites.
## yt-dlp
yt-dlp is a [youtube-dl](https://github.com/ytdl-org/youtube-dl) fork based on the now inactive [youtube-dlc](https://github.com/blackjack4494/yt-dlc). The main focus of this project is adding new features and patches while also keeping up to date with the original project
### Install
```shell
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp && sudo chmod a+rx /usr/local/bin/yt-dlp
```
### Extract audio from YouTube video with youtube-dl
```shell
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" <URL>
```
### Download Album from YouTube Music
```shell
yt-dlp --extract-audio --audio-format mp3 -o "%(playlist_index)s - %(title)s.%(ext)s" <URL of Playlist>
```
### Download all parts of a multistream
```shell
yt-dlp -S "res:480" <url>
```
## Reference
* [youtube-dl (original)](https://ytdl-org.github.io/youtube-dl/index.html)
* [yt-dlp](https://github.com/yt-dlp/yt-dlp/#installation)