Skip to content

Instantly share code, notes, and snippets.

View zooks's full-sized avatar

zooks zooks

View GitHub Profile
services:
db:
image: mariadb:latest
hostname: wp_database
container_name: wp_database
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
TZ: "Europe/Moscow"
@zooks
zooks / template.html
Last active December 10, 2024 07:29
MODX Fenom MIGX
{set $index = 0}
{set $slider = json_decode($_modx->resource.slider, true)}
{foreach $slider as $row}
<div>
<img src="{$row.image | phpthumbon : 'w=1920&zc=0'}" title="{$row.heading}" alt="{$row.heading}">
<a href="{$row.link}">
{$row.content}
</a>
</div>
@zooks
zooks / touchegg.conf
Last active June 16, 2023 11:05
Touchegg config for XFCE ~/.config/touchegg/touchegg.conf
<touchégg>
<settings>
<property name="composed_gestures_time">111</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="1" direction="ALL">
<action type="DRAG_AND_DROP">BUTTON=1</action>
</gesture>
<gesture type="DRAG" fingers="3" direction="RIGHT">
<action type="SEND_KEYS">Control+Alt+Right</action>
@zooks
zooks / .gitignore
Created December 14, 2017 23:00
gitignore for October CMS
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@zooks
zooks / cleave-js-class.js
Created August 29, 2022 16:13
Cleave.js apply to all elements with specific classname
window.onload = function () {
var datesCollection = document.getElementsByClassName("input-date");
var dates = Array.from(datesCollection);
dates.forEach(function (date) {
new Cleave(date, {
date: true,
delimiter: '-',
datePattern: ['Y', 'm', 'd']
})
@zooks
zooks / app.js
Created August 29, 2022 16:09
cleave-js-phone-russia
var cleave = new Cleave('.phone-mask', {
// prefix: '+7 ',
numericOnly: true,
blocks: [0, 3, 3, 2, 2],
delimiters: ["+7 (", ") ", " ", "-", "-"]
});
@zooks
zooks / update-modx.sh
Created December 24, 2017 06:04
Update MODX
#!/bin/bash
echo Please specify MODX version:
read version
echo Downloading MODX $version...
wget https://modx.com/download/direct?id=modx-$version-pl.zip
unzip direct\?id\=modx-$version-pl.zip && rm direct\?id\=modx-$version-pl.zip
--------------------
----------------
|^^^пиво^^\\|""\\_,_
|___________||___|__|)
(@)(@)""*|(@)(@)**(@)
@zooks
zooks / grub.conf
Created February 11, 2020 18:34
Windows Boot Manager (on /dev/sda1)
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 040D-E584
else
search --no-floppy --fs-uuid --set=root 040D-E584
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
md "OptimizedJPEGS"
for %%i in (*.jpg) do "C:\Program Files (x86)\GnuWin32\bin\jpegtran.exe" -optimize -progressive -copy none "%%i" > "OptimizedJPEGS\%%i"