This file contains hidden or 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 deepScan(scanOperationParams, dynamodbClient) { | |
return dynamodbClient | |
.scan({ | |
ConsistentRead: true, | |
...scanOperationParams, | |
}) | |
.promise() | |
.then(async ({ Items, LastEvaluatedKey }) => { | |
if (!LastEvaluatedKey) { | |
return Items; |
This file contains hidden or 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 PRODUCTS = [ | |
{ id: 1, name: "Potato chips", description: "Deliciousness" }, | |
{ id: 2, name: "Glue", description: "Do not smell" } | |
] | |
function Master(props) { | |
return PRODUCTS.map(product => ( | |
<button onClick={() => props.onClickProduct(product)} key={product.id}> | |
{product.name} | |
</button> |
This file contains hidden or 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 purgeFromTailwind = content => content.match(/[\w-/:]+(?<!:)/g) || []; |
This file contains hidden or 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
/* | |
* Make Slick.js sliders load gracefully | |
*/ | |
.graceful { | |
visibility: hidden; | |
-webkit-transition: opacity 1s; | |
transition: opacity 1s; | |
opacity: 0; | |
} |
This file contains hidden or 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 getParents($childPostId, $parentPostType, $acfKey) { | |
return get_posts(array( | |
'post_type' => $parentPostType, | |
'meta_query' => array( | |
array( | |
'key' => $acfKey, | |
'value' => '"' . $childPostId . '"', | |
'compare' => 'LIKE' | |
) | |
) |
This file contains hidden or 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
// Clear Cache (64 MB Limit) | |
if ( class_exists('autoptimizeCache') ) { | |
$myMaxSize = 48000; | |
$statArr = autoptimizeCache::stats(); | |
$cacheSize = round( $statArr[1] / 1024 ); | |
if ($cacheSize > $myMaxSize ) { | |
autoptimizeCache::clearall(); | |
if ( class_exists('W3_Plugin_TotalCacheAdmin') ) | |
{ |
This file contains hidden or 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 atimport = require("postcss-import"); | |
const { dest, src, task } = require("gulp"); | |
const postcss = require("gulp-postcss"); | |
const purgecss = require("@fullhuman/postcss-purgecss"); | |
const tailwindcss = require("tailwindcss"); | |
const TAILWIND_CONFIG = "./tailwind.config.js"; | |
const SOURCE_STYLESHEET = "./src/style.css"; | |
const DESTINATION_STYLESHEET = "./build/style.css"; |
This file contains hidden or 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
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": " ", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": false, | |
"quotes": "single", |
This file contains hidden or 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
javascript:location.href='http://cssstats.com/stats?url='+window.location.href+'&ua=Browser Default' |