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 |
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 | |
# yt-dlp --skip-download --write-auto-subs --convert-subs srt "https://www.youtube.com/@CHANNEL" | |
# run this script | |
# for f in out/*.txt; do echo "$f"; cat "$f"; echo -e "\n\n\n"; done | split -l 100000 | |
output_directory="out" | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 file1.srt file2.srt ..." |
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 -euf -o pipefail | |
get_warnings() { | |
lein check 2>&1 | grep "Reflection" || { echo "Error in reflection-linter.sh"; exit 1; } | |
} | |
parse_line() { | |
echo $1 | awk -F 'Reflection warning, |:| - ' '{print $2, $3, $4, $5}' |
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
sed -e 's/ *#.*$//' -e 's/[ ,]*$//' -e 's/ *, */,/g' | sort | uniq |
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
echo 'your_encrypted_data' | ruby -ractive_support -ractive_support/message_encryptor -e "puts ActiveSupport::MessageEncryptor.new([ENV['DECRYPTION_KEY']].pack('H*'), cipher: 'aes-256-gcm').decrypt_and_verify(STDIN.read)" |
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
openapi: "3.0.0" | |
info: | |
title: "Discord API" | |
version: "1.0.0" | |
servers: | |
- url: "https://discord.com/api" | |
paths: | |
/oauth2/token: | |
post: | |
summary: "Refresh the access token" |