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 downloadImages(selector) { | |
| function saveImg(blob, fileName) { | |
| var a = document.createElement("a") | |
| document.body.appendChild(a) | |
| a.style = "display: none" | |
| var url = window.URL.createObjectURL(blob) | |
| a.href = url | |
| a.download = fileName | |
| a.click() |
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 | |
| # file: ttfb.sh | |
| # check the TTFB for a list of sites | |
| # add list of sites here | |
| declare -a sites=() | |
| # test results will be output here | |
| rm -rf $HOME/Desktop/TTFB-`date +"%m-%d-%Y"`.csv | |
| echo "TTFB Test on: `date +"%m-%d-%Y %H:%M"`\n URL, Connect, TTFB, Total Time" | cat >> $HOME/Desktop/TTFB-`date +"%m-%d-%Y"`.csv |
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
| Array.from(document.querySelectorAll('a')).map( el => el.addEventListener("click", e => e.preventDefault())) |
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
| add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 ); | |
| function add_search_box( $items, $args ) { | |
| $items .= '<li class="primary-nav_searchbar">' . get_search_form( false ) . '</li>'; | |
| return $items; | |
| } |