Valet switch PHP version with these commands
Install PHP 5.6 and switch Valet to PHP 5.6
valet stop
brew unlink php71
brew install php56
brew install php56-mcrypt
import type {SanityClient} from '@sanity/client' | |
import {v5 as uuidv5} from 'uuid' | |
import {buildCollectionDocumentId, commitCollectionDocument} from './sanityOps' | |
import type {ShopifyDocumentCollection} from './storageTypes' | |
import {SHOPIFY_COLLECTION_DOCUMENT_TYPE, UUID_NAMESPACE_COLLECTIONS} from './constants' | |
import {DataSinkCollection} from './requestTypes' | |
import {idFromGid} from './requestHelpers' |
<section x-data="{showModal: false, showLoading: false, html: ''}"> | |
<button | |
@click="html='loading...'; showLoading = true; showModal = !showModal; | |
fetch('{{ entry.url }}', { | |
method: 'GET', | |
headers: { | |
'X-Requested-With': 'XMLHttpRequest', | |
}, | |
}) |
$(document).mouseup(function(e) { | |
var container = $('YOUR CONTAINER SELECTOR'); | |
if (!container.is(e.target) && container.has(e.target).length === 0) { | |
container.fadeOut('fast'); | |
} | |
}); |
'➜'.charCodeAt(0).toString(16); //enter in console – outputs '279c' | |
// Then add \ at the front, so the full code would be: | |
ul li:before { | |
content: '\279c'; | |
} |
$("a[rel=external], a[href^='http:']:not([href*='" + window.location.host + "']), a[href^='https:']:not([href*='" + window.location.host + "'])").each(function(){ | |
$(this).attr("target", "_blank"); | |
}); |
<select name="nationality"> | |
<option value="">-- select one --</option> | |
<option value="afghan">Afghan</option> | |
<option value="albanian">Albanian</option> | |
<option value="algerian">Algerian</option> | |
<option value="american">American</option> | |
<option value="andorran">Andorran</option> | |
<option value="angolan">Angolan</option> | |
<option value="antiguans">Antiguans</option> | |
<option value="argentinean">Argentinean</option> |
<?php | |
/** | |
* Intelligently replacement for print_r & var_dump. | |
* | |
* @param mixed $code | |
* @param bool $output. (default: true) | |
* @return $code | |
*/ | |
function hm( $code, $output = true ) { |