This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute instances stop "instance-xxx" --zone="zzz" --project="project-yyy" | |
gcloud beta compute instances set-scopes "instance-xxx" --scopes=storage-full --zone="zzz" --project="project-yyy" | |
gcloud compute instances start "instance-xxx" --zone="zzz" --project="project-yyy" | |
gcloud compute ssh --zone "zzz" "instance-xxx" --project "project-yyy" -- -L 8080:localhost:8080 | |
# on the remote machine | |
gcloud init | |
export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Define directories | |
video_dir="./video" | |
audio_dir="./audio" | |
# Create an array of all opus files | |
mapfile -t music_files < <(find "$audio_dir" -type f -name '*.opus') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Download Google Takeout/Gmail | |
- apt-get install mutt mb2md mboxgrep | |
- mb2md -s $PWD/all.mbox -d $PWD/maildir | |
- mboxgrep -m maildir -H -E "From:.+(a|b|c)@" -o out.mbox maildir | |
- mutt -f out.mbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://docs.ultra.cc/books/unofficial-language-installers-3AK/page/install-python-using-pyenv | |
bash <(wget -qO- https://scripts.usbx.me/util/LanguageInstaller/Python-Installer/main.sh) | |
source ~/.profile | |
which python | |
pip3 install yt-dlp | |
wget -O bin/yt-dlp-webui https://github.com/marcopeocchi/yt-dlp-web-ui/releases/download/v3.0.7/yt-dlp-webui_linux-amd64 | |
chmod +x bin/yt-dlp-webui | |
bin/yt-dlp-webui --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#~/.config/systemd/user/aria2c.service | |
#PORT from "app-ports free" | |
#SECRET from pwgen | |
#systemctl --user daemon-reload | |
#systemctl --user enable --now aria2c | |
[Unit] | |
Description=aria2c | |
After=network-online.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias runlike="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike" | |
for i in $(sudo docker ps | awk '{print $1}' | tail -n +2); do runlike $i; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const runner = (module.exports = {}); | |
/** | |
* The Pa11y versions supported by this runner. | |
* @public | |
* @type {Array} | |
*/ | |
runner.supports = "^6.0.0 || ^6.0.0-alpha || ^6.0.0-beta"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.cloud import firestore | |
from datetime import datetime | |
import json | |
import concurrent.futures | |
from tqdm import tqdm | |
import math | |
client = firestore.Client(database="xxxxx", project="xxxxx") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created new Autopilot cluster | |
# https://docs.gitlab.com/runner/install/kubernetes.html | |
# Create a runner at https://gitlab.com/groups/GROUP/-/runners | |
wget https://github.com/derailed/k9s/releases/download/v0.28.2/k9s_Linux_amd64.tar.gz | |
tar xvfz k9s*gz | |
gcloud container clusters get-credentials CLUSTER --region REGION --project PROJECT | |
helm repo add gitlab https://charts.gitlab.io | |
helm repo update gitlab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
curl -s --fail --header "Private-Token: $GITLAB_TOKEN" "https://gitlab.com/api/v4/groups/$GITLAB_GROUP_ID/runners" | \ | |
jq -r '.[] .id' | \ | |
while read -r runner_id; do | |
echo "Deleting runner: $runner_id" | |
curl --fail --header "Private-Token: $GITLAB_TOKEN" --request DELETE "https://gitlab.com/api/v4/runners/${runner_id}" | |
done |
NewerOlder