Skip to content

Instantly share code, notes, and snippets.

Giorgos Sarigiannidis gsarig

Block or report user

Report or block gsarig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gsarig
gsarig / Spoilers toggler for insomnia.gr
Last active May 15, 2019
A Greasemonkey script which adds a button to batch reveal spoilers on insomnia.gr. Spoiler morghulis!
View Spoilers toggler for insomnia.gr
// ==UserScript==
// @name Spoilers toggler for insomnia.gr
// @match https://www.insomnia.gr/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @version 1
// @grant none
// ==/UserScript==
@gsarig
gsarig / Show ACF field names in WordPress Admin
Created Oct 7, 2018
A Greasemonkey script to display ACF field names next to their labels on WordPress Admin
View Show ACF field names in WordPress Admin
// ==UserScript==
// @name Show ACF field names in WP Admin
// @match http://*/wp-admin/*
// @match https://*/wp-admin/*
// @match http://*/*/wp-admin/*
// @match https://*/*/wp-admin/*
// @version 1
// @grant none
// ==/UserScript==
@gsarig
gsarig / remove_greek_accents.php
Last active Sep 6, 2018
PHP function to remove accents from Greek text
View remove_greek_accents.php
<?php
/*
* Run it like so:
*
* $text = 'Your text';
* echo remove_greek_accents( $text );
*/
function remove_greek_accents( $string )
{
@gsarig
gsarig / wp-cli_batch_db_backup.sh
Last active Jul 29, 2018
Batch backup a server's WordPress databases with WP-CLI
View wp-cli_batch_db_backup.sh
#!/bin/bash
# A bash script to batch backup a server's WordPress databases with WP-CLI. It requires WP-CLI, obviously (https://wp-cli.org/).
# The script will search for all WordPress installations under a given directory and will backup their databases. You can declare more than one such directories.
# You don't have to modify the script every time you add a new site. As long as the new site is under a declared parent directory, its database will be backed up.
# After creating the file, don't forget to make it executable by doing:
# chmod +x wp-cli_batch_db_backup.sh
# Also, you might want to add this in a cron job for scheduled backups.
# Set PATH environment variable
You can’t perform that action at this time.