Skip to content

Instantly share code, notes, and snippets.

View jungaretti's full-sized avatar
🌲
Squatchin'

JP Ungaretti jungaretti

🌲
Squatchin'
View GitHub Profile
@jungaretti
jungaretti / daily-italian-privacy-policy
Created October 19, 2023 02:16
Daily Italian Privacy Policy
Daily Italian does not collect any personal information.
@jungaretti
jungaretti / codespaces.sh
Last active July 20, 2022 23:57
Configure your Codespaces settings with ease
ms_alias=""
cs_settings_file="$HOME/codespaces-settings.json"
# Uncomment the next two lines to load bash completion functions
# autoload -Uz +X compinit && compinit
# autoload -Uz +X bashcompinit && bashcompinit
cs_export() {
export VSCS_TARGET="$(jq -r '.vscsTarget // ""' $cs_settings_file)"
export VSCS_LOCATION="$(jq -r '.vscsRegion // ""' $cs_settings_file)"
@jungaretti
jungaretti / install-cuda-libraries.sh
Last active December 10, 2022 04:12
Install CUDA and cuDNN libraries from Nvidia on Debian-based Linux distros
KEYRING_PACKAGE="cuda-keyring_1.0-1_all.deb" && \
UBUNTU_VERSION="$(lsb_release -sr | sed 's/\.//g')" && \
KEYRING_REPO="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu$UBUNTU_VERSION/x86_64" && \
KEYRING_PACKAGE_URL="$KEYRING_REPO/$KEYRING_PACKAGE" && \
KEYRING_PACKAGE_PATH="$(mktemp -d)" && \
KEYRING_PACKAGE_FILE="$KEYRING_PACKAGE_PATH/$KEYRING_PACKAGE" && \
wget -O "$KEYRING_PACKAGE_FILE" "$KEYRING_PACKAGE_URL" && \
sudo apt-get install -yq "$KEYRING_PACKAGE_FILE" && \
sudo apt-get update -yq && \
sudo apt-get install -yq cuda-libraries-11-7 libcudnn8
@jungaretti
jungaretti / Get-YouTubeChannel.ps1
Last active March 28, 2022 16:25
Download an entire YouTube channel using youtube-dl with parallel downloads
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$ChannelURL
)
# TODO: Use any youtube-dl
..\youtube-dl.exe --get-id $Channel | % {
Start-Job -ScriptBlock { ..\youtube-dl.exe --restrict-filenames "https://youtube.com/watch?v=$($args[0])" } -ArgumentList @($_) -Name $_
@jungaretti
jungaretti / linode-base-arch.bash
Last active May 7, 2023 20:13
Basic config for a secure Arch Linux server on Linode
# Start by creating a new Linode
# https://cloud.linode.com/linodes/create
# Update all packages and install important packages
pacman -Syu ntp sudo ufw
# Configure ntp
systemctl enable ntpd.service
timedatectl set-ntp 1
@jungaretti
jungaretti / Person.ts
Last active March 28, 2022 16:23
Hackathon Demo
export class Person {
name: string;
constructor(name: string) {
this.name = name;
}
}