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 | |
/** | |
* Get human readable time difference between 2 dates | |
* | |
* Return difference between 2 dates in year, month, hour, minute or second | |
* The $precision caps the number of time units used: for instance if | |
* $time1 - $time2 = 3 days, 4 hours, 12 minutes, 5 seconds | |
* - with precision = 1 : 3 days | |
* - with precision = 2 : 3 days, 4 hours |
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 | |
REMOTE_URL="https://staging.example.com" | |
LOCAL_URL="http://example.dev" | |
REMOTE_PATH="/home/staging_example/public_html" | |
LOCAL_PATH="/var/www/example.dev" | |
SSH_HOST="[email protected]" |
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 | |
// Define a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
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
// brought to you by Liam Bailey | |
// That way if I want to see the output I just add ?dbg_smrand to the url and presto | |
define('wp_debug', true); | |
define('wp_debug_log', true); | |
define('wp_debug_display, isset($_GET['dbg_smrand'])); |
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 | |
# Install dependencies | |
# older ubuntus | |
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev | |
# xenial | |
apt install build-essential libsqlite3-dev ruby-dev | |
# Install the gem | |
gem install mailcatcher --no-ri --no-rdoc |
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
.removeInput { | |
position: absolute; | |
right: 15px; | |
z-index: 999; | |
background-color: white; | |
display: block; | |
border-radius: 10px; | |
font-size: 10px; | |
line-height: 20px; | |
width: 20px; |
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
Run this command to install MG-CLI: | |
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb | |
to start miner (4 cores for BCN) use this command: | |
minergate-cli -user <[email protected]> -bcn 4 | |
Feel free to send some of your earnings to me: | |
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j |
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 | |
/** | |
* code #1 - update the post excerpt character length | |
* @param integer | |
* @return integer | |
*/ | |
function my_excerpt_length($length) | |
{ | |
return 65; |
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 | |
/** | |
* code #1 - removes excess Wordpress header tags from default themes. | |
*/ | |
function clean_wp_header() { | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'rel_canonical'); | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'feed_links',2); |
NewerOlder