Skip to content

Instantly share code, notes, and snippets.

View dalibor-sojic's full-sized avatar

Dalibor Sojic dalibor-sojic

View GitHub Profile
@dalibor-sojic
dalibor-sojic / maticen.html
Last active April 10, 2021 01:13
EMBG Macedonia
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
</title>
</head>
@dalibor-sojic
dalibor-sojic / optimize-images.sh
Last active November 9, 2019 13:10
Optimize images on upload with inotify and jpgoptim
#!/usr/bin/env
MONITORDIR="/home/_______/public_html/wp-content/uploads/"
inotifywait -m -r -e create --format '%w%f' "${MONITORDIR}" | while read NEWFILE
do
jpegoptim --strip-all ${NEWFILE}
done
<?php
namespace App\Helpers;
use Sunra\PhpSimple\HtmlDomParser;
class UJPCrawler
{
#!/bin/bash
GROUP_ID="xxxx"
BOT_TOKEN="xxxx"
# this 3 checks (if) are not necessary but should be convenient
if [ "$1" == "-h" ]; then
echo "Usage: `basename $0` \"text message\""
exit 0
fi