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 | |
| /** | |
| * @param WP_Query|null $wp_query | |
| * @param bool $echo | |
| * @param array $params | |
| * | |
| * @return string|null | |
| * | |
| * Accepts a WP_Query instance to build pagination (for custom wp_query()), | |
| * or nothing to use the current global $wp_query (eg: taxonomy term page) |
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 dataURItoBlob(dataURI) { | |
| // convert base64 to raw binary data held in a string | |
| // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this | |
| var byteString = atob(dataURI.split(',')[1]); | |
| // separate out the mime component | |
| var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] | |
| // write the bytes of the string to an ArrayBuffer | |
| var ab = new ArrayBuffer(byteString.length); |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| docker run --rm -d -p 8080:8080/tcp -e PORT=8080 $(docker build -q .) |
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 class="mx-auto"> | |
| <label class="sr-only" for="subscribe"> Your Email (required)</label> | |
| [email* your-email id:subscribe class:form-control class:flex-fill class:mr-0 class:mr-sm-2 class:mb-3 class:mb-sm-0 placeholder "Enter email address..."] | |
| [submit class:btn class:btn-primary "Subscribe"]</div> | |
| [contact-form-7 id="10" title="Contact form" html_id="" html_class="container"] | |
| <div class="form-group"> |
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
| sudo virt-install \ | |
| --name mariadb \ | |
| --ram 1024 \ | |
| --boot uefi \ | |
| --disk path=/dev/zvol/zpool-kvm/mariadb,bus=virtio,cache=unsafe,io=threads \ | |
| --vcpus 2 \ | |
| --os-type linux \ | |
| --os-variant debian10 \ | |
| --network bridge=virbr0,model=virtio \ | |
| --graphics none \ |