Skip to content

Instantly share code, notes, and snippets.

View Alceatraz's full-sized avatar
🉑
Mojar +1s

Alceatraz Warprays Alceatraz

🉑
Mojar +1s
View GitHub Profile
@Alceatraz
Alceatraz / TOTP.java
Last active March 9, 2024 14:32
RFC6238 TOTP in java lib-less only std lib
package org.example;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
@Alceatraz
Alceatraz / dget.sh
Created March 22, 2023 09:42
A simple script to download container image
#!/usr/bin/env bash
name=$1
file=$1
file=$(sed "s#/#-#g" <<< "$file")
file=$(sed "s#:#-#g" <<< "$file")
file="$file.tar.gz"
docker pull "your.mirror.site/$name"
docker tag "your.mirror.site/$name" "$name"