Skip to content

Instantly share code, notes, and snippets.

@jaredatch
jaredatch / mailhog-mamp.md
Created Jan 30, 2018
Install MailHog with MAMP Pro
View mailhog-mamp.md

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@manigandham
manigandham / html-editors.md
Last active Jun 5, 2021
Rich text / HTML editors and frameworks
View html-editors.md

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors

@nc-aura
nc-aura / Froala and Carrierwave-RoR Demo.html
Last active Apr 10, 2019
Image upload with Froala and Rails 4, Carrierwave, Fog AWS
View Froala and Carrierwave-RoR Demo.html
...
...
<textarea froala="froalaOptions"></textarea>
...
...
View WooCommerce: How To Get WooCommerce Page IDs
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@raveren
raveren / cryptographically_secure_random_strings.php
Last active May 31, 2021
Generate cryptographically secure random strings. Based on Kohana's Text::random() method and this answer: http://stackoverflow.com/a/13733588/179104
View cryptographically_secure_random_strings.php
function random_text( $type = 'alnum', $length = 8 )
{
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'hexdec':