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
#!/bin/bash | |
USER="root" | |
PASSWORD="" | |
FILES="/Users/tenold/Backups/MySQL/*" | |
for f in $FILES | |
do | |
echo "Processing $f file..." |
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
#!/bin/sh | |
## backup each mysql db into a different file, rather than one big file | |
## as with --all-databases. This will make restores easier. | |
## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
## Create the user and directories | |
# mkdir -p /var/backups/mysql/databases | |
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
## Remember to make the script executable, and unreadable by others |
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 // Don't copy this line... | |
/** | |
* This function will Kill 'blogs/editor' rewrite rules | |
* to fix the broken pagination issue on this page: | |
* '/blogs/editor/' | |
* | |
* This fix was needed because we add rewrite rules for CPT: editor | |
* And because '/blogs/editor/' is also a static page, the pagination | |
* on that page e.g., '/blogs/editor/page/4/' was broken. |
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 // please don't copy this line. | |
/** | |
* Get SERP Name | |
*/ | |
function jiv_get_serp_name() { | |
if ( isset( $_SERVER['HTTP_REFERER'] ) ) { | |
$serps = array( 'google', 'bing', 'yahoo', 'duckduckgo' ); | |
$referer = $_SERVER['HTTP_REFERER']; | |
$result = jiv_get_domain_from_url( $referer ); |
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 | |
/** | |
* Get Full Customer Name from Order ID | |
* | |
* Author: Zeshan Ahmed | |
* Author URI: https://zeshanahmed.com/ | |
*/ | |
function za_full_customer_name( $order_id ) { |
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
{ | |
// ECHO | |
"PHP Echo Tag": { | |
"prefix": "echo", | |
"body": [ | |
"<?php echo ${1:\\$var}; ?>" | |
], | |
"description": "Expand \"echo\" into PHP echo block" | |
}, | |
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 // This like is just for code highlighting purpose, don't copy it... | |
/** | |
* Insert link Inside Widget Title | |
* | |
* Author: Zeshan Ahmed | |
* Author URI: https://zeshanahmed.com/ | |
*/ | |
add_filter( 'dynamic_sidebar_params', 'update_dynamic_sidebar_params' ); | |
function update_dynamic_sidebar_params( $params ) { |
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 // don't include this line. | |
/** | |
* Random Posts | |
* @param integer $count describe how many random posts you would want to fetch. | |
* @return string HTML of the returned posts. | |
*/ | |
function za_random_related_posts( $count = 3 ) { | |
global $global_exclude_post_ids; |
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 | |
// SHOW YOAST PRIMARY CATEGORY, OR FIRST CATEGORY | |
$category = get_the_category(); | |
$useCatLink = true; | |
// If post has a category assigned. | |
if ($category){ | |
$category_display = ''; | |
$category_link = ''; | |
if ( class_exists('WPSEO_Primary_Term') ) |
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
A File Icon | |
AdvancedNewFile | |
Alignment | |
All Autocomplete | |
AutoFileName | |
Autoprefixer | |
Boxy Theme | |
Boxy Theme Addon - Widget Font Size | |
BracketHighlighter | |
Color Highlighter |