- P tags are now set to 16px for 0-767px breakpoint as per Google's recommendation.
- Footer header sizes now take effect in 0-767px breakpoint instead of just 0-480px.
- Fixed font size for code tags
- Classes added for mobile alignment (0-767px):
m-align-right
m-align-left
http://getkirby.com/docs/toolkit/api/str/contains
//str::contains($str, $needle, $i = true);
$string = "This is a long string with a DooHicky inside";
$needle = "doohicky";
$doohicky_status = str::contains($string, $needle);
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 | |
// Add shortcode for displaying page with thumbnail and excerpt | |
function show_page($atts, $content = null) { | |
extract(shortcode_atts(array( | |
'id' => false, | |
), $atts)); | |
// display error message if user is logged in | |
if($id == false) { |
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
# https://www.siteground.com/kb/how_to_reset_my_wordpress_admin_password/ | |
UPDATE `wp_users` SET `user_pass` = MD5('new_password_here') WHERE `wp_users`.`user_login` = "admin_username"; |
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
-- Plesk domain structure | |
-- http://pleskhacker.com/all-tables/domains-all-tables/psa_domains/ | |
-- Show domains | |
-- Output: name, id, status, and hosting type | |
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Ns -e "SELECT domains.name, domains.id, domains.status, domains.htype FROM domains" | |
-- Only show active domains that are not suspended or disabled domains | |
-- Output: name, hosting type |
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 | |
#http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
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
$time_pre = microtime(true); | |
exec(...); | |
$time_post = microtime(true); | |
$exec_time = $time_post - $time_pre; |
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
find . -type d -print0 | xargs -0 chmod 755 | |
find . -type f -print0 | xargs -0 chmod 644 |
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 | |
# usage: | |
# sh get-directory-via-sftp.sh hostname:port username password source_folder destination_folder | |
# sh get-directory-via-sftp.sh example.com:2222 awesome_user Ultra-pw-9000 /remote-folder-name ~/Downloads/ | |
# This will copy /remote-folder-name to ~/Downloads/remote-folder-name | |
HOST=$1 | |
USER=$2 | |
PASS=$3 |
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
db_name=`grep "DB_NAME" wp-config.php | cut -d \' -f 4` && db_user=`grep "DB_USER" wp-config.php | cut -d \' -f 4` && db_pw=`grep "DB_PASSWORD" wp-config.php | cut -d \' -f 4` && mysqldump -u$db_user -p$db_pw $db_name > $db_name.sql |