- https://fishshell.com/ - my default shell, i use theme bobthefish
- https://www.sublimetext.com/ - my default editor
- Material Theme
- Operator font
- Packages: Emmet, Hayaku, SidebarEnhancements, JS Snippets, GSAP Snippets
- Sublime snippet for comments
- Sublime icon
- https://code.visualstudio.com/ - trying to switch, but not yet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document, undefined) { | |
"use strict"; | |
var _Scrolleo = function(opts) { | |
// Defaults | |
this.acceleration = 0.08; //1 is fastest, 0 is slowest, 0.08 is default | |
this.secondsPerScreen = null; //Set this to the length of the video. "1" is 1 second. | |
this.additionalOffset = 0; //Add or subtract pixels to when the video will start. "10" means that the video will start 10px earlier. | |
this.wrapperEl = null; |
A interactive & generative site with canvas-sketch and Tone.js.
Live Demo:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Perks // Nested Forms // Delay Child Notifications for Parent Payment | |
* http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
*/ | |
add_filter( 'gpnf_should_send_notification', function( $should_send_notification, $notification, $context, $parent_form, $nested_form_field, $entry, $child_form ) { | |
if( $context == 'parent' ) { | |
$parent_entry = GFAPI::get_entry( rgar( $entry, 'gpnf_entry_parent' ) ); | |
$should_send_notification = in_array( rgar( $parent_entry, 'payment_status' ), array( 'Paid', 'Active' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Renders the admin page. | |
*/ | |
function admin_page() { | |
$screen = get_current_screen(); | |
$parent = get_admin_page_parent(); | |
$user_meta = get_usermeta( get_current_user_id(), 'wordpress_screen_options_demo_options' ); | |
?> | |
<div class="wrap <?php echo esc_attr( $parent ); ?>"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gravity Forms Dynamic Redirect | |
add_filter( 'gform_confirmation', 'dlm_gf_dynamic_redirect', 10, 4 ); | |
function dlm_gf_dynamic_redirect( $confirmation, $form, $entry, $ajax ) { | |
// DLM GF Handler | |
$dlm_gf_handler = new DLM_GF_Gravity_Forms_Handler(); | |
// fetch download ID dynamically from form | |
$lead_id = $dlm_gf_handler->get_lead_index_of_dlm_field( $form ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Do NOT include the opening php tag */ | |
add_filter( 'btc/filter/integrations/all', 'btc_tweak_integration_args', 20, 1 ); | |
/** | |
* Plugin: Builder Template Categories - Tweak arguments of integrations, for | |
* example labels. | |
* | |
* Note: The priority of the filter needs to be higher than 10, otherwise it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Flickity-based carousel for returning posts from the loop. I find it far more versatile and simple than a Bootstrap | |
* carousel. Get the required scripts and styles from here: https://flickity.metafizzy.co/ | |
*/ | |
<div class="blog-carousel"> | |
<?php | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Tribe, adding user meta to the attendees csv export | |
* Source: https://theeventscalendar.com/support/forums/topic/adding-woocommerce-order-notes-to-attendees-export/ | |
* | |
* Last updates: August 9, 2018 | |
**/ | |
function tribe_export_custom_set_up( $event_id ) { | |
//Add Handler for Community Tickets to Prevent Notices in Exports |
NewerOlder