Skip to content

Instantly share code, notes, and snippets.

@nciske
nciske / speedmail.applescript
Last active February 8, 2021 20:03 — forked from ttscoff/speedmail.applescript
Speed up Mail.app
(*
Speed up Mail.app by vacuuming the Envelope Index
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/
Originally by "pmbuko" with modifications by Romulo
Updated by Brett Terpstra 2012
Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compability
Updated by @lbutlr for V5 and Container folder in High Sierra and use du
Updated by @nciske for V6 in Mojave
NOTE: Mojave users will need to grant Terminal.app or Automator.app (wherever you run the script) full disk access for the script to run successfully
@nciske
nciske / functions.php
Last active October 6, 2017 18:20 — forked from About2git/functions.php
Full width Soliloquy slider in Genesis
<?php
//* Do NOT include the opening php tag
//* This is optional if you don't want to use a widget for display (e.g. a shortcode or ACF will handle output)
//* Register Home Slider widget area
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => 'Home Slider',
'description' => 'This is the home slider section'
) );
@nciske
nciske / wpdb-transactions
Last active April 24, 2022 13:45 — forked from 5iDS/wpdb-transactions
MySQL database transaction, using the WordPress database object $wpdb. Requires the InnoDB table format.
<?php
global $wpdb;
// Start Transaction
$wpdb->query( "START TRANSACTION" );
// Do some expensive/related queries here
//$wpdb->query("DELETE FROM table WHERE form_id = '1' ");
//$wpdb->query("DELETE FROM data WHERE form_id = '1' ");
// set $error variable value in error handling after $wpdb modifications
<?php
// THIS WORKS FINE
function sr_user_profile_update_email( $user_id, $old_user_data ) {
$user = get_userdata( $user_id );
if($old_user_data->user_email != $user->user_email) {
$admin_email = "chris@revelationconcept.com";
$message = sprintf( __( 'This user has updated their profile on the SchoolRise USA Staff Member site.' ) ) . "\r\n\r\n";
@nciske
nciske / single.php
Last active December 10, 2015 11:38 — forked from billerickson/single.php
// Remove Genesis Author Box and load our own
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
add_action( 'genesis_after_post', 'be_author_box' );
/**
* Load Author Boxes
*
* @author Bill Erickson
* @link http://www.billerickson.net/wordpress-post-multiple-authors/
*/