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
tell application "System Events" | |
tell application "Finder" to activate desktop | |
tell process "Finder" | |
click menu item "Clean Up" of menu "View" of menu bar item "View" of front menu bar | |
end tell | |
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 ($) { | |
const all_svg_logos = $('svg'); | |
all_svg_logos.each(function (svg_idx, svg_item) { | |
if ($(svg_item).children('linearGradient').length) { | |
$(svg_item).children('linearGradient').each(function (linear_idx, linear_elm) { | |
$(svg_item).children('g').children('path').each(function (path_idx, path_prop) { | |
if (path_prop.getAttribute("fill").includes(linear_elm.getAttribute("id"))) { | |
// Set unique identifier for fill attribute of <path> element based on SVG's occurrence index | |
path_prop.setAttribute("fill", "url(#" + linear_elm.getAttribute("id") + "_" + svg_idx + ")"); | |
} |
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
#!/bin/bash | |
for dir in $(ls -d */ | grep -v cache | grep -v node_modules | cut -f1 -d'/'); do | |
( | |
echo "checking $dir :"; | |
pushd "$dir" &>/dev/null || { | |
printf "error: failed to change to %s\n" "$dir" >&2 | |
continue | |
} | |
echo "--------------------------------"; | |
cat $(find app/styles/ -type f) | |
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
#!/usr/bin/env bash | |
# HOW TO USE | |
# Save code to file | |
# Run as "SCRIPT_FILE_NAME SASS_DIRECTORY" | |
# e.g "./find_unused_scss_variables.sh ./sass" | |
VAR_NAME_CHARS='A-Za-z0-9_-' | |
find "$1" -type f -name "*.scss" -exec grep -o "\$[$VAR_NAME_CHARS]*" {} ';' | sort | uniq -u |
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
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
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
<?php | |
add_filter('acf/pre_load_reference', 'hwk_bypass_get_field_ref', 10, 3); | |
function hwk_bypass_get_field_ref($return, $field_name, $post_id){ | |
if(is_int($post_id)) | |
$return = acf_get_field($field_name, $post_id); | |
return $return; | |
} |
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
git rev-list --objects --all | grep -f <(git verify-pack -v .git/objects/pack/*.idx| sort -k 3 -n | cut -f 1 -d " " | tail -10) |
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
Regarding why the write operation was of poor throughput it would depend on the amount of data that would be inserted by the operation along with any deadlocks or wait events waiting for a lock it may need to take hold off as well. To that end if possible you could run those write operations to check for any deadlocks(by checking the output of the show engine innodb status) they may be causing , further you can also run profile on them to see what stage of the execution is slowing down the whole query. The explain plan will also provide us with insights on the query execution plan allowing you to make changes to improve efficiency. | |
https://dev.mysql.com/doc/refman/5.7/en/show-profile.html | |
https://dev.mysql.com/doc/refman/5.7/en/show-engine.html | |
https://dev.mysql.com/doc/refman/5.7/en/explain.html | |
>>Do we have to look at using managed Aurora cluster with read replicas, connection pooling for better throughput? | |
It is indeed an alternative that you can consider, your workload contains both read and writ |
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
Alternatively, you can install it using any of the following: | |
docker run -it --rm -p 8888:8888 ghcr.io/validator/validator:latest | |
npm install vnu-jar | |
brew install vnu | |
pip install html5validator | |
See https://validator.github.io/validator/ for more details. | |
If you have docker installed, docker option is the easiest. |
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
comment | |
counts | |
plugins | |
learndash_reports | |
learndash_admin_profile | |
wc_session_id |