<?php
global $wp_query; // you can remove this line if everything works for you
// don't display the button if there are not enough posts
if ( $wp_query->max_num_pages > 1 )
echo '<div class="misha_loadmore">More posts</div>'; // you can use <a> as well
?>Thanks to Automated Snapshots / Backups via Vultr API And this is Python3 version script used to Automatic snapshots using Vultr API
A more customizable alternative to Vultr's backup feature using Vultr API v1. Tested on Ubuntu 16.04. Run this python3 script on Anywhere to create a snapshot of VPS (which you know IP or it's subid) and rotate out the oldest snapshot(s). Use the BACKUP_TAG_PREFIX prefix field to uniquely id a set of snapshots.
Notice: You can only create 11 snapshots by default.
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 // only copy if needed | |
| /** | |
| * Removes coupon form, order notes, and several billing fields if the checkout doesn't require payment. | |
| * | |
| * REQUIRES PHP 5.3+ | |
| * | |
| * Tutorial: http://skyver.ge/c | |
| */ | |
| function sv_free_checkout_fields() { |
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
| /** | |
| * Disable script concatenation. | |
| * If WordPress's dashboard isn't loading styles from load-styles.php | |
| * add this to wp-config.php to disable concatenation and load styles that | |
| * don't have errors | |
| */ | |
| define( 'CONCATENATE_SCRIPTS', false ); |
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
| const net = require('net'); | |
| const opts = { | |
| host: 'localhost', | |
| port: 80, | |
| //sockets: 8000, | |
| sockets: 1000, | |
| respawn: true, | |
| //rate: 600, | |
| rate: 5e3, |
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
| <!DOCTYPE html> | |
| <html> | |
| <!-- | |
| Copyright 2011 Google Inc. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
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
| const fs = require('fs'); | |
| const path = require('path'); | |
| function cleanEmptyFoldersRecursively(folder) { | |
| var isDir = fs.statSync(folder).isDirectory(); | |
| if (!isDir) { | |
| return; | |
| } | |
| var files = fs.readdirSync(folder); | |
| if (files.length > 0) { |
NewerOlder