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
<!-- | |
Via: http://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript | |
--> | |
<textarea class="js-copytextarea">Hello I'm some text</textarea> | |
<button class="js-textareacopybtn">Copy Text</button> | |
<script> |
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
<div data-async='{"script": "javascript/vendor/plugin.js", "event": "scroll"}’> | |
[ all of the content for this plugin ] | |
</div> |
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 | |
$SITEPATH = $_SERVER['DOCUMENT_ROOT'] . '/path/to/dir/'; | |
function get_uri( $image, $mime = '' ) { | |
return 'data: ' . $mime . ';base64,'.base64_encode(file_get_contents( $image )); | |
} | |
?> |
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 | |
// REF: http://stackoverflow.com/questions/14780804/how-do-i-read-a-google-drive-spreadsheet-in-php | |
$spreadsheet_url="https://docs.google.com/spreadsheets/d/1MLAko1Eym5O-Qt7cRQb55RBWH3ZHW2_VmHCV0x1Bx5s/pub?gid=0&single=true&output=csv"; | |
$stack = array(); | |
if(!ini_set('default_socket_timeout', 15)) echo "<!-- unable to change socket timeout -->"; |
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
UPDATE wp_posts SET guid=replace(guid, 'http://old.url', 'http://new.url'); | |
UPDATE wp_posts SET post_content=replace(post_content, 'http://old.url', 'http://new.url'); |
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
/* | |
// Source: https://madebymike.com.au//writing/service-workers/ | |
<script> | |
if ( 'serviceWorker' in navigator && ( typeof Cache !== 'undefined' && Cache.prototype.addAll ) ) { | |
navigator.serviceWorker.register( '/sw.js' ); | |
} | |
</script> | |
*/ |
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
Modal: http://www.humaan.com/modaal/ | |
Tabs: http://www.scottohara.me/tabs/ | |
Accordion: https://github.com/nico3333fr/jquery-accessible-accordion-aria | |
Slider: http://kenwheeler.github.io/slick/ | |
Tooltips: https://github.com/scottaohara/a11y_tooltips |
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
/** | |
* Create svg images | |
* | |
* @param string $name Icon name. | |
* @param array $opts Optional attributes. | |
* | |
* @return string | |
*/ | |
function svg_icon( $name, $opts = array() ) { |
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
/* | |
* Bookmarklet is an external script for sharing content Via wordpress | |
* It was specifically designed for csskarma.com, but feel free to nab it. | |
* | |
* Bookmarklet content ( NOTE: change the URL path ): | |
* | |
* javascript:(function ()%7Bvar jsCode %3D document.createElement(%27script%27)%3BjsCode.setAttribute(%27src%27, %27https://csskarma.com/js/bookmarklet.js%27)%3Bdocument.body.appendChild(jsCode)%3B %7D())%3B | |
* | |
*/ |
OlderNewer