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 | |
BTICK='`' | |
EXPECTED_ARGS=3 | |
E_BADARGS=65 | |
MYSQL=`which mysql` | |
Q1="CREATE DATABASE IF NOT EXISTS ${BTICK}$1${BTICK};" | |
Q2="GRANT ALL ON ${BTICK}$1${BTICK}.* TO '$2'@'localhost' IDENTIFIED BY '$3';" | |
Q3="FLUSH PRIVILEGES;" |
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 | |
$dirs = array_filter(glob('*'), 'is_dir'); | |
foreach ($dirs as $dir) { | |
echo $dir; | |
} | |
?> |
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 | |
$dirs = array_filter(glob('*'), 'is_dir'); | |
foreach ($dirs as $dir) { | |
if ($dir !== 'scp_dump' || $dir !== 'scp_dump') { | |
echo "<a href='http://".$dir.".devdomain.com/'>".$dir.'</a><br/>'; | |
} | |
} | |
?> |
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
// Add [phonenumber] shortcode | |
function phonenumber_shortcode( $atts ){ | |
//retrieve phone number from database | |
$lm_array = get_option('lowermedia_phone_number'); | |
//check if user is on mobile if so make the number a link | |
if (wp_is_mobile()) | |
{ | |
return '<a href="tel:+'.$lm_array["id_number"].'">'.format_phonenumber($lm_array["id_number"]).'</a>'; | |
} else { |
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
body.admin-bar { | |
margin-top: -28px; | |
padding-bottom: 28px; | |
} | |
#wpadminbar { | |
top: auto !important; | |
bottom: 0; | |
} | |
#wpadminbar .quicklinks>ul>li { | |
position:relative; |
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
/** | |
* Custom Post Types | |
* | |
**/ | |
function lm_custom_post_type_creator($post_type_name, $description, $public, $menu_position, $supports, $has_archive, $irreg_plural) { | |
if ($irreg_plural) {$plural = 's';} else {$plural = '';} | |
$labels = array( | |
'name' => _x( $post_type_name, 'post type general name' ), | |
'singular_name' => _x( $post_type_name, 'post type singular name' ), |
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 | |
echo $tokens[sizeof(explode('/', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))-2]; | |
?> |
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 | |
echo " " | |
echo "Password Length(#1-100):" | |
read PLENGTH | |
#return date in number format | |
DATE=$(date +%s) | |
#create password string of 4 letters |
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 | |
echo "Enter Short Name for Database:" | |
read DATABASENAME | |
echo "Enter Short Name for User:" | |
read USERNAME | |
DATE=$(date +%s) | |
PASSWORD1=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 4 | head -n 1) |
NewerOlder