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
#!/bin/bash | |
# Set connection data accordingly | |
source_host=localhost | |
source_port=6379 | |
source_db=1 | |
target_host=localhost | |
target_port=6379 | |
target_db=2 | |
# Copy all keys without preserving ttl! |
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
#!/bin/bash | |
# Copyright © 2017 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 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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 | |
/** | |
* Check if a request originated from a crawler, spider, or bot. | |
* | |
* @param null|string $userAgent | |
* @param array $identifiers | |
* @return bool | |
*/ | |
if (!function_exists('isBot')) { | |
function isBot($userAgent = null, $identifiers = array()) |
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
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Allows you to load JavaScript files programatically from within other JavaScript files in your project. | |
// | |
// Instructions: | |
// 1. Include this file before all other scripts in your project. | |
// 2. Call jsLoader.load() or jsLoader.loadAsync() from within your scripts passing a single JS file path or | |
// array of multiple JS paths to load into your script at runtime. | |
// | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
const jsLoader = { |
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
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// Allows the console browser object to be enabled or disabled seamlessly throughout your entire project. This is | |
// useful when you want to disable all console logging on a production release without removing the actual calls | |
// to the console.log (or other console methods) from your application code. | |
// | |
// Instructions: | |
// 1. Include this file before all other scripts in your project (including it first lets it capture all console methods) | |
// 2. Call the console.enabled() function passing a boolean indicating whether you want the console methods to be actioned or not | |
// | |
// By default this script will prevent console messages from appearing in the browser, so if you want them to be displayed |