rsync --compress --archive --partial --append-verify --verbose --progress -e "ssh -i ~/SSH_KEY" LOCAL_FILE.zip REMOTE_USER@REMOTE_IP:REMOTE_FILE.zip
scp -i ~/SSH_KEY LOCAL_FILE REMOTE_USER@REMOTE_IP:REMOTE_FILE.zip
# useful for aur arch | |
# generate an SSH key pair | |
cd repository | |
git config --add --local core.sshCommand 'ssh -i /home/user/.ssh/ssh_key' | |
git push |
Get a Gcloud instance with GPU and Debian 12 (spot instances are cheaper but can be interrupted)
Add a VPC firewall rule to enable 7860 port. Add this rule to the Compute Instance (edit -> networking)
Open a screen: screen
. It is always a good idea to use screen, because if the connection interrupts, it will preserve the opened process.
Next time when you connect, type screen -r
to reopen or screen -rd
to force reopen after an interruption.
Install and verify GPU driver:
Since the download URL is only accessible if you are signed in, and accessing the snapshot with s3 is also not possible for some reason, your only option is to make a request to the download URL with the same authentication headers you have on your personal computer. In this example we'll copy the whole download request as a cURL command from the Chrome inspector:
Log in to Backblaze in your browser, and head to the Snapshots page.
Open the inspector (F12) and go to the "network" tab.
Start downloading the file (you can cancel it immediately)
#!/bin/bash | |
# Directory containing your music files | |
# It will NOT search subfolders, you can change that by removing -maxdepth 1 | |
MUSIC_DIR="/you/music/folder" | |
# Number of random songs to play | |
NUM_SONGS=100 | |
# Check if VLC is installed |
const ethers = require('ethers'); | |
function generateEthereumKeyPair() { | |
// Generate a random wallet | |
const wallet = ethers.Wallet.createRandom(); | |
// Get the private key | |
const privateKey = wallet.privateKey; | |
// Get the public key |
#!/bin/bash | |
# Input and output files | |
input_file="input.txt" | |
output_file="output.txt" | |
# Initialize line counter | |
line_counter=0 | |
# Remove output file if it exists |
Steps to install and use a model in Ollama with Open WebUI in Docker:
Run Ollama container:
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
Run Open Web UI container:
Source: https://www.thomasmartens.eu/contabo-dns-lookup-timeouts/
I got a ton of getaddrinfo EAI_AGAIN
(alpine) and getaddrinfo ENOTFOUND
(debian) errors in my nodejs app, running in docker.
Also sometimes curl fails with curl: (6) Could not resolve host: ...
Turns out contabo DNS servers are unreliable.
resolvectl status | grep 'DNS Servers' -A2
or cat /etc/resolv.conf