Skip to content

Instantly share code, notes, and snippets.

View sirchrispy's full-sized avatar
🤔
Just doing my thing.

Chris Power sirchrispy

🤔
Just doing my thing.
View GitHub Profile
@kaixin-l
kaixin-l / sublime-text-3-cloud-drive-sync
Created February 19, 2016 09:48
Sync Sublime Text 3 Settings via iCloud Drive
# Create a directory named "Sublime Text 3 Sync" under iCloud Drive
mkdir ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync
# Enter Sublime Text 3's directory
cd ~/Library/Application\ Support/Sublime\ Text\ 3/
# Move "Installed Packages" directory to iCloud Drive and make a link
mv Installed\ Packages/ ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync/
ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/SubLime\ Text\ 3\ Sync/Installed\ Packages
@amitramani
amitramani / functions.php
Last active February 9, 2018 22:49
How to get Crawler Based Search Engine for Swiftype on WordPress using Genesis
// October 11, 2015 Change search form text from https://wpbeaches.com/change-search-field-default-text-genesis-wordpress-theme/
function themeprefix_search_button_text( $text ) {
return ( 'Start Typing...');
}
add_filter( 'genesis_search_text', 'themeprefix_search_button_text' );
function b3m_search_form( $form, $search_text, $button_text, $label ) {
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\"";
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\"";
@srikat
srikat / class-custom-featured-post.php
Last active April 3, 2022 16:29 — forked from GaryJones/readme.md
Custom Featured Posts Widget plugin: Skeleton for amending the output of the Genesis Featured Posts widget. https://sridharkatakam.com/custom-featured-post-widget-plugin/
<?php
/**
* Plugin Name
*
* @package Custom_Featured_Post_Widget
* @author Gary Jones
* @license GPL-2.0+
* @link http://gamajo.com/
* @copyright 2013 Gary Jones, Gamajo Tech
*/
@butlerblog
butlerblog / functions.php
Last active March 24, 2026 17:46
SMTP using wp-config.php for settings #smtp #wp_mail
<?php // Don't use this line.
/*
* Add the script below to wherever you store custom code snippets
* in your site, whether that's your child theme's functions.php,
* a custom plugin file, or through a code snippet plugin.
*/
/**
* This function will connect wp_mail to your authenticated
@andrasguseo
andrasguseo / modify-imported-event-timezones.php
Last active November 1, 2019 21:51
Modify timezone and time when importing with EA (The Events Calendar)
<?php
/*
* Description: Modifies the timezone and the time of imported events, if the source
* feed timezone is UTC
*
* Usage: Copy the snippet into your theme's (preferably child theme's) functions.php file.
* Modify the URL and the timezone at the end of the code based on your needs
* Timzone name list: the TZ* column on this page
* https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
*
@jtsternberg
jtsternberg / wpcli-flywheel-cache-flush.php
Last active July 26, 2021 14:03
Flush cache on Flywheel Local VM
<?php
function handle_remote_cache_requests_for_local() {
global $_wp_using_ext_object_cache;
if (
empty( $_wp_using_ext_object_cache )
|| ! isset( $_REQUEST['check'], $_REQUEST['command'] )
|| ! function_exists( 'wp_cache_' . $_REQUEST['command'] )
|| str_replace( ABSPATH, '', __FILE__ ) !== $_REQUEST['check']
) {
@andrasguseo
andrasguseo / delete-events-before-import.php
Last active October 22, 2020 03:46
Event Aggregator - delete events before import
<?php
/**
* Created by PhpStorm.
* Plugin Name: Berean Baptist Church Calendar Import Fixer
* Description: Forces removal of events no longer represented in the imported calendar.
* Version: 0.0.1
* Author: Steve Dwire for Berean Baptist Church
* Author URI: https://www.berean-baptist.org/
* License: GPLv2
*/
add_filter('use_block_editor_for_post', '__return_false');