Skip to content

Instantly share code, notes, and snippets.

View s-gbz's full-sized avatar
🏠
Working from home

Sergej Grilborzer s-gbz

🏠
Working from home
View GitHub Profile
@s-gbz
s-gbz / nginxproxy.md
Created July 28, 2021 07:09 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@s-gbz
s-gbz / create-resized-image-copies.sh
Created October 24, 2020 18:36
Auto delete, resize, convert & rename images. The script is to be executed with a linux bash and can be expanded to make further use of variables (e.g. generate various resolution)
# The script expects a directory structure like this:
# . (Execute the script from this directory)
# - /originals (Original images to be processed)
# - /fulls (Copies with reduced, but better quality to be displayed in "full size" and only loaded on click)
# - /thumbnails (Copies with lower quality than "fulls". Used as gallery thumbnails and thus loaded first)
# - /tiny-thumbnails (Copies with minimal resolution. Used as navigation thumbnails inside a photo viewer)
# Used in production at: https://grilborzer.de
# GitHub: https://github.com/s-gbz/grilborzer.github.io
DIRECTORY_ORIGINALS=./originals
@s-gbz
s-gbz / README.md
Created October 19, 2020 08:20 — forked from LBBO/README.md
Bookmarklet to change the speed of voice messages in WhatsApp Web (or any website, really...)

How to use this bookmarklet

A bookmarklet is JavaScript code that has been "transformed" into a URL. You can set up a bookmark with the code as its URL and opening the bookmark will then execute the code.

To quickly create the Bookmark, just right-click the bookmarks bar and add a new one. Choose a name and then copy and past the code from bookmarklet_URL.txt into the location of your new bookmark.