Discover gists
This file contains 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
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ### | |
# | |
# Officially, this is not recommended. YMMV | |
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ | |
# | |
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit | |
# | |
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels | |
# |
This file contains 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 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 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 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 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 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 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 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() ) { |
NewerOlder