Skip to content

Instantly share code, notes, and snippets.

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

calvez calvez

🏠
Working from home
  • Budapest, Hungary
View GitHub Profile
@calvez
calvez / runcloud-wordpress-backup-update.sh
Last active August 29, 2025 13:47
Simple script what iterates thru runcloud wordpress instances, saves the plugin/theme versions, create db backup and update core, themes, plugins, languages. Feel free to use.
#!/bin/bash
# WordPress Backup & Update Script
# Runs backups and updates for all WP instances under /home/*/webapps/*
# Intended for cron: Friday midnight
BACKUP_RETENTION_DAYS=60
HOME_DIR="/home"
for USER_DIR in "$HOME_DIR"/*; do
USER=$(basename "$USER_DIR")
# Shell is non-interactive. Be done now!
[ -z "$PS1" ] && return
[[ $- != *i* ]] && return
# Display
shopt -s checkwinsize
# Umask
umask 077
@calvez
calvez / locales.json
Created October 15, 2023 10:44
hybridly pnig crm demonstaration - locale file for en
{
"en": {
"contacts": {
"menuTitle": "Contacts",
"attributes": {
"first_name": "First Name",
"last_name": "Last Name",
"name": "Name",
"organization_id": "Organization",
"email": "Email",
@calvez
calvez / balazs.json
Last active September 26, 2023 15:06
{"version":"1.2.9","files":[{"loadFromURL":false,"label":"Untitled","id":0,"autoFields":[],"fields":[{"key":"Személy vezetéknév","description":"Személy vezetéknév","cardinality":1,"type":"text","blanks":0,"uniques":[],"uniqueKey":false,"special":[],"unassignedSpecialChars":[],"countBy":false,"errors":[],"descriptiveField":"generated","$$hashKey":"object:116"},{"key":"Díj neve","description":"Díj neve","cardinality":17,"type":"text","blanks":0,"uniques":[],"uniqueKey":false,"special":["-"],"unassignedSpecialChars":["-"],"countBy":false,"errors":[],"descriptiveField":"generated","$$hashKey":"object:117"},{"key":"A díj odaítélésének időpontja","description":"A díj odaítélésének időpontja","cardinality":12,"type":"date","blanks":0,"uniques":[],"uniqueKey":false,"special":["-"],"unassignedSpecialChars":[],"countBy":false,"errors":[],"descriptiveField":"generated","$$hashKey":"object:118"},{"key":"Díj típusa","description":"Díj típusa","cardinality":3,"type":"text","blanks":0,"uniques":[],"uniqueKey":false,"special
{
"version": "1.2.9",
"files": [
{
"loadFromURL": false,
"label": "Untitled",
"id": 0,
"autoFields": [],
"fields": [
{
@calvez
calvez / pdfcompress.sh
Created August 14, 2023 21:57
optimize pdf in one line
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf inputfile.pdf
@calvez
calvez / main.css
Created July 26, 2023 11:50 — forked from elwint/main.css
Expanding Search Bar/Box CSS only (no JS)
/* Free to use for everyone */
/* Example: http://codepen.io/elwint/pen/vGMRaB */
body {
font-family: sans-serif;
background-color: #111;
}
.button {
display: inline-block;
@calvez
calvez / .bashrc
Created August 26, 2022 12:07
bash or zsh directory colors and listing tweaks
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
@calvez
calvez / wp-perf.md
Created July 6, 2022 20:30 — forked from Ruzgfpegk/wp-perf.md
WordPress Performance & Development tips
@calvez
calvez / ffmpeg-to-480p.sh
Created February 27, 2022 10:03 — forked from blacklee/ffmpeg-to-480p.sh
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4