Skip to content

Instantly share code, notes, and snippets.

@seebz
seebz / reusable-blocks-extended.php
Created September 27, 2021 13:49
Reusable Blocks Extended v0.7-patch
<?php
/**
* Plugin Name: Reusable Blocks Extended
* Plugin URI: https://jeanbaptisteaudras.com/en/2019/09/reusable-block-extended-a-cool-wordpress-plugin-to-extend-gutenberg-reusable-block-feature/
* Description: Extend Gutenberg Reusable Blocks feature with a complete admin panel, widgets, shortcodes and PHP functions.
* Version: 0.7-patch
* Author: audrasjb
* Author URI: https://jeanbaptisteaudras.com/en
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@seebz
seebz / resizer.sh
Created March 7, 2021 13:49
resizer.sh
#!/usr/bin/env bash
MAXWIDTH=2000
MAXHEIGHT=0
usage() {
echo "Usage: resizer FILENAME"
}
filesize() {
@seebz
seebz / SCSS.md
Created May 4, 2019 09:19 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@seebz
seebz / fix-theme-translations.php
Created April 29, 2019 12:22
Fix theme translations
<?php
/*
Plugin Name: Fix theme translations
Description: Try to fix missing theme translations.
Author: Seebz
Author URI: http://seebz.net/
Version: 1.0
*/
function load_textdomain_mofile_fix( $mofile ) {
@seebz
seebz / pretty-uri.php
Created October 16, 2018 10:04
Pretty URI - Enhance internal URIs (usefull when a migration is planned).
<?php
/*
Plugin Name: Pretty URI
Description: Enhance internal URIs (usefull when a migration is planned).
Version: 1.0
Author: Seebz
Author URI: http://seebz.net/
*/
@seebz
seebz / test.php
Created July 16, 2018 18:02
Test CPT WP avec recherche
<?php
/*
Plugin Name: Fruits
Description: J'aime les fruits.
Version: 1.0
Author: Seebz
*/
/**
* Enregistre notre CPT `fruit`.
@seebz
seebz / lamp.md
Last active September 24, 2018 09:26
Mon install PHP/MySQL sur Ubuntu/Debian (DevMachine)

LAMP

PHP

sudo apt install php-cli \
	php-curl \
#!/bin/bash
if (( $EUID != 0 )); then
echo "Please run as root"
exit 1
fi
# replace url in `/usr/share/package-data-downloads/ttf-mscorefonts-installer`
s="http://downloads.sourceforge.net/corefonts/"
r="https://freefr.dl.sourceforge.net/project/corefonts/the%20fonts/final/"
@seebz
seebz / gufw-notify.sh
Created October 16, 2016 15:44
Uncomplicated Firewall notifications
#!/bin/bash
#
# Uncomplicated Firewall notifications
#
notify() {
notify-send --expire-time=5000 --app-name=gufw --icon=gufw "$@"
}
[Desktop Entry]
Type=Application
Name=Computer
Name[fr]=Poste de travail
Comment=Browse all local and remote disks and folders accessible from this computer
Comment[fr]=Parcourir tous les disques locaux et distants ainsi que les dossiers accessibles depuis cet ordinateur
Exec=xdg-open computer:///
Terminal=false
Icon=computer
Categories=GNOME;GTK;Utility;Core;FileManager;