Skip to content

Instantly share code, notes, and snippets.

View codeclinic's full-sized avatar

Phill Healey codeclinic

View GitHub Profile
@ewenchou
ewenchou / README.md
Last active July 8, 2023 04:36
Run Python script as systemd service
  1. Create a service file like dash_sniffer.service
  2. Put it in /lib/systemd/system/
  3. Reload systemd using command: systemctl daemon-reload
  4. Enable auto start using command: systemctl enable dash_sniffer.service
@5A5K1A
5A5K1A / wordpress-hooks-admin.php
Last active April 12, 2018 12:36
WordPress Admin Color Scheme
<?php
function custom_admin_color_scheme() {
wp_admin_css_color(
'scheme_name',
__('Scheme Name', 'domain'),
admin_url("/css/colors/scheme_name/colors.css"),
array('#07273E', '#14568A', '#07273E', '#07273E'),
array('base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff')
);
@actuino
actuino / raspberry-tft-9.95-ili9488.md
Last active July 7, 2025 04:18
Cheap 3.95 TFT Screen with ili9488 from mcufriend on a Raspberry Pi Zero
@khromov
khromov / disable-rest-api-for-anonymous-users.php
Created October 13, 2017 15:55
Disable WordPress REST API for anonymous users
<?php
/*
Plugin Name: Disable REST API for anonymous users
*/
/**
* Remove all endpoints except SAML / oEmbed for unauthenticated users
*/
add_filter( 'rest_authentication_errors', function($result) {
if ( ! empty( $result ) ) {
<?php
/*
Plugin Name: GF file upload to ACF image field
Plugin URI: https://gist.github.com/certainlyakey/8c19791b3133beb62d323bf060bf4270
Description: Map Gravity forms file upload field to ACF image/file field so GF would upload the file and save id to DB instead of URL.
Version: 1.0.0
Author: Kellen Mace
*/
@vovafeldman
vovafeldman / freemius-merging-free-premium.php
Created October 29, 2018 08:51
How to merge free and premium version into one with Freemius
<?php
/**
* Plugin Name: ...
* Plugin URI: ...
* ...
*
* @fs_premium_only /path/to/premium/folder/
*/
// Freemius Init SDK code
function my_fs() {