Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| <?php | |
| add_action( 'init', function() { | |
| remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | |
| }); | |
| add_action( 'user_register', function ($user_id) { | |
| wp_update_user([ | |
| 'ID' => $user_id, | |
| 'admin_color' => 'Default' // Light | Blue | Midnight | Sunrise | Ectoplasm | Ocean | Coffee | |
| ]); |
| <?php | |
| class LazyContainer { | |
| private $dictionary; | |
| public function __construct( $definitions ){ | |
| $this->dictionary = $definitions; | |
| } | |
| public function __get( $n ){ |
| <?php | |
| /** | |
| * Digest HTTP Authentication class | |
| * | |
| * PHP version 5.5 | |
| * | |
| * @author Gabriele Diener <gabriele.diener@caffeina.com> | |
| */ | |
| class DigestAuth { |
| SELECT * FROM | |
| ( | |
| SELECT | |
| @i:=@i+1 AS rownum, | |
| subq.* | |
| FROM | |
| ( | |
| SELECT id,date FROM articles | |
| ) subq, | |
| (SELECT @i:=0) r |
| (function() { | |
| var filterName = new RegExp(prompt("Insert the regex"), 'i'); | |
| if (!filterName) { | |
| return alert('Invalid regex'); | |
| } | |
| var MAX_ITERATIONS = 500; | |
| var $profileNode = document.querySelector('[title="Profile"] > span'); |
| # With oh-my-zsh | |
| echo 'export GPG_TTY=$(tty)' >> .my_zshrc | |
| # With bash | |
| echo 'export GPG_TTY=$(tty)' >> .bashrc |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| <?php | |
| include "tree.php"; | |
| $x = new Tree(); | |
| $x->bacon = "Pancetta"; | |
| $x->pasta["fagioli"] = 3; | |
| $y = clone $x; | |
| $y->pasta = null; |
| <?php | |
| /* | |
| Plugin Name: WP Mail Proxy | |
| Version: 1.0.0 | |
| Description: Reconfigures the wp_mail() function. | |
| Author: Gabriele Diener | |
| Author URI: https://gdiener.com | |
| */ | |
| /** |