Skip to content

Instantly share code, notes, and snippets.

View codeclinic's full-sized avatar

Phill Healey codeclinic

View GitHub Profile
@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() {
<?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
*/
@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 ) ) {
@actuino
actuino / raspberry-tft-9.95-ili9488.md
Last active July 16, 2023 07:51
Cheap 3.95 TFT Screen with ili9488 from mcufriend on a Raspberry Pi Zero
@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')
);
@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
@wolffe
wolffe / chip-scan.php
Created February 1, 2016 12:58
base64 Scanner
<html>
<head>
<title>Find String</title>
</head>
<body>
<?php
ini_set('max_execution_time', '0');
ini_set('set_time_limit', '0');
find_files('.');
// Callback function to remove default bio field from user profile page & re-title the section
// ------------------------------------------------------------------
// Thanks to original code found here: https://wordpress.org/support/topic/remove-the-bio-section-from-user-profile
// More reference: http://wordpress.stackexchange.com/questions/49643/remove-personal-options-section-from-profile
// Alternate examples: http://wordpress.stackexchange.com/questions/38819/how-to-remove-biography-from-user-profile-admin-page
if(!function_exists('remove_plain_bio')){
function remove_bio_box($buffer){
$buffer = str_replace('<h3>About Yourself</h3>','<h3>User Password</h3>',$buffer);
$buffer = preg_replace('/<tr class=\"user-description-wrap\"[\s\S]*?<\/tr>/','',$buffer,1);
<?php
//Drop this in your functions.php file in a safe place
//Change all references to "borough" or "Borough" to the taxonomy you need (pay attention to the correct capitalization)
//Then save the edited functions.php
//Find this new filter in: WP Admin > Events > Settings > Filterbar
//Docs for TribeEventsFilter: http://docs.tri.be/Filter-Bar/class-TribeEventsFilter.html
//
//
//This addresses adding/registering the taxonomy to WordPress and the filter functionality to Events Calendar Pro Filter Bar in one shot
//
@pgburt
pgburt / Podcast-Checklist.md
Last active April 13, 2024 22:19
Audacity Podcast Checklist

Recording

  • Set Audacity to use the External mic.
  • Ensure you're recording in 16-bit PCM + 44100Hz.
  • Do a sound check, record everyone in the room speaking. You want the lighter part of the meter bar (the green or red bar at the top) to bounce between -12db and -6db while people are talking. It's hard to achieve this... so just settle for as close as you can get, without the bars going off the scale :)
  • Play it back and tweak levels until it sounds good @ 60% speaker volume.
  • Save the Project BEFORE recording live :D (prevents quality issues)

Edit for Content

  • Join recordings to one track.
  • Listen to it + Edit bad content out.