Skip to content

Instantly share code, notes, and snippets.

View sstorholm's full-sized avatar

Sebastian Storholm sstorholm

View GitHub Profile
@sstorholm
sstorholm / bulk-convert.ps1
Last active March 1, 2022 23:12 — forked from frozenex/bulk-convert.ps1
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
}
@sstorholm
sstorholm / 418.conf
Last active February 2, 2018 19:46 — forked from felixhummel/418.conf
The Last nginx Config You Will Ever Need
server {
listen 80 default_server;
location / {
return 418;
}
error_page 418 /custom_418.html;
location = /custom_418.html {
root /var/www/html/errors;