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
// 1. Log in to your Amazon account | |
// 2. Go to your Content Library > Books - https://www.amazon.com/hz/mycd/digital-console/contentlist/booksAll/dateDsc/ | |
// 3. Open your browser's Javascript console | |
// 4. For each page of books, paste this script into the console | |
(async function () { | |
// Close the notification if it appears | |
function closeNotification() { | |
const notifClose = document.querySelector("span#notification-close"); | |
if (notifClose) { |
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
// 1. Log in to your Amazon account | |
// 2. Go to your Content Library > Books - https://www.amazon.com/hz/mycd/digital-console/contentlist/booksAll/dateDsc/ | |
// 3. Open your browser's Javascript console | |
// 4. For each page of books, paste this script into the console | |
(async function () { | |
// Close the notification if it appears | |
function closeNotification() { | |
const notifClose = document.querySelector("span#notification-close"); | |
if (notifClose) { |
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 | |
add_filter( 'gettext', function( $translated_text, $untranslated_text, $domain ) { | |
if ( function_exists( 'wc' ) && 'woocommerce' === $domain ) { | |
//make the changes to the text | |
switch( $untranslated_text ) { | |
case 'Billing details': | |
if ( ! WC()->cart->needs_shipping() && 0.0 === floatval( WC()->cart->get_total( 'edit' ) ) ) { |
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 | |
/** | |
* On form load, check for a saved entry for current user | |
*/ | |
add_filter( 'caldera_forms_render_entry_id', function ( $entry_id, $form ){ | |
//change form ID to match your form | |
if( 'CF1234567' == $form[ 'ID' ] && get_current_user_id() ){ | |
$saved_entry_id = get_user_meta( get_current_user_id(), 'form_entry_id', true ); | |
if( 0 < absint( $saved_entry_id ) ){ | |
$entry_id = $saved_entry_id; |
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
// @flow | |
import React, { Component } from "react" | |
type Props = { | |
onMouseEnter?: Function | boolean, | |
onMouseLeave?: Function | boolean, | |
} | |
type State = { |
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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, git, subversion, composer, curl and wget | |
# | |
# WordPress and the WP_UnitTestCase are installed in the /tmp directory | |
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file |
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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, git, subversion, composer, curl and wget | |
# | |
# WordPress and the WP_UnitTestCase are installed in the /tmp directory | |
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file |
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
/** | |
* This is an example of a script that would hook into the filter or | |
* subscribe to some sort of data. I want to make the assumption that | |
* this could be non-ES6 code with no access to the spread operator, so | |
* something like push would be used instead. | |
*/ | |
function rkvAddPython( codeList ) { | |
codeList.push( { | |
title: 'Python', | |
codemirror: 'python', |
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 | |
/** | |
* Delete one field's value after Caldera Forms sends main mailer | |
*/ | |
add_action( 'caldera_forms_submit_complete', | |
function( $form, $referrer, $process_id, $entry_id ){ | |
//IMPORTANT: Change form ID here | |
$form_id = 'CF123456'; | |
//IMPORTANT: Change field ID here |
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
const { __ } = wp.i18n; | |
const { Component } = wp.element; | |
const el = wp.element.createElement; | |
export default class Select extends Component { | |
constructor( props ) { | |
super( ...props ); | |
this.selectCallback = this.selectCallback.bind(this); | |
this.state = { |
NewerOlder