Skip to content

Instantly share code, notes, and snippets.

View benyaminl's full-sized avatar
😬
Crazy with C#

Benyamin Limanto benyaminl

😬
Crazy with C#
View GitHub Profile
@benyaminl
benyaminl / Dockerfile
Created November 16, 2022 01:16
Wordpress Dev Docker File (not as git repo, because, it's simpler to be gist than repo...) This docker-compose is specified for podman version >= 4.2.0, because mapping selinux context. It's better to have SELINUX than NOT!
FROM docker.io/library/wordpress:6.0.2
# See https://www.shellhacks.com/create-csr-openssl-without-prompt-non-interactive/
RUN openssl req -new -newkey rsa:2048 -days 1095 -nodes -x509 -keyout /etc/ssl/private/wp.key -out /etc/ssl/private/wp.crt -subj "/C=ID/ST=Surabaya/L=Surabaya/O=ISTTS/OU=IT Department/CN=stts.edu"
RUN a2enmod ssl
COPY ./wp-ssl.conf /etc/apache2/sites-available/wp-ssl.conf
RUN a2ensite wp-ssl
EXPOSE 80
EXPOSE 443
@benyaminl
benyaminl / record.sh
Created April 19, 2023 13:51
Recording ffmpeg toggle from xfce keyboard map. If there are running ffmpeg for it, it will be killed.
#!/bin/sh
record=$(pgrep -a ffmpeg | grep x11grab | awk "{print \$1}" | xargs -I {} echo {})
if [ -z $record ];
then
xwininfo | {
while IFS=: read -r k v; do
case "$k" in
*"Absolute upper-left X"*) x=$v;;
*"Absolute upper-left Y"*) y=$v;;
*"Border width"*) bw=$v ;;