Skip to content

Instantly share code, notes, and snippets.

View frozenex's full-sized avatar

Frozenex frozenex

  • Tirunelveli, Tamil Nadu, India
View GitHub Profile
@frozenex
frozenex / AadhaarUtil.kt
Created June 23, 2018 04:41
Aadhaar Number Validation in Kotlin
/**
* Validate aadhaar number using verhoeff algorithm
* Created by Frozenex
*/
class AadhaarUtil {
companion object {
private val d by lazy {
arrayOf(intArrayOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
@frozenex
frozenex / gitlab-runner.sh
Last active September 29, 2019 02:35
Gitlab Runner Docker Container
#!/bin/bash
docker run -d \
--name gitlab-runner \
--restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:alpine
read -p "Enter gitlab runner registration-token: " TOKEN
@frozenex
frozenex / bulk-convert.ps1
Last active January 14, 2024 02:04
Bulk convert images to webp format using cwebp library in windows
# Copy this file to any directory containing images & then run this script in powershell
# Get all png images in the current directory & convert it to webp format
$images = Get-ChildItem -Path (Get-Location) -Filter *.png
foreach ($image in $images) {
$fileName = $image.DirectoryName + "\" + $image.BaseName + ".webp"
cwebp.exe -q 80 $image.FullName -o $fileName
}
@frozenex
frozenex / bulk-convert.sh
Created September 14, 2020 12:17
Bulk convert images to webp format using cwebp library in linux
#!/bin/bash
# Copy this file to any directory containing images & then run this script in bash shell
# Get all png images in the current directory & convert it to webp format
for file in *.png ;
do
cwebp -q 80 "$file" -o "${file%.png}.webp";
done