- Enable root permission (BEWARE: there is no going back; only do this if you need complete control over the server)
- Install Developer Tools (this setting is located in the same section where you setup root access)
- Setup root password.
- Setup a domain or subdomain.
- Add a new ftp user and set "Access to the server over SSH" to "/bin/bash" (this will let you use putty and command line)
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 | |
function makeImage( $msg, $msg2, $font='./arial.ttf', $fontsize=40, $output='pic1.png') | |
{ | |
$fontcolor = imagecolorallocate($im, 128, 128, 128); | |
echo $msg; | |
echo "<br/>".$msg2; | |
$backgroundImg = imagecreatefromjpeg("logo-usarmy-with-texture-640x360.jpg"); |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
class Skubbs_Post_Types { | |
public static function init() { | |
add_action( 'init', array( __CLASS__, 'register_post_types' ), 5 ); |
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 | |
/* Short Title | |
* return a short title with ellipsis if the title is too long | |
* accepts a maxchar value | |
* Usage Example: echo short_title( $maxchar = 100 ); | |
* Place the code inside the loop and set the character limit. If the title is longer than the character limit set, | |
* it will display ellipsis at the end. | |
--------------------------------------------------------------------*/ | |
function short_title( $maxchar = 90 ) { | |
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 | |
/////////////////////////////////////////////////////////////////////////////////// | |
// // | |
// This is using a sample local WordPress Install and is not production safe // | |
// It uses the REST and Basic Auth plugins // | |
// // | |
/////////////////////////////////////////////////////////////////////////////////// | |
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 the average pixel colour from the given file using Image Magick | |
* | |
* @param string $filename | |
* @param bool $as_hex Set to true, the function will return the 6 character HEX value of the colour. | |
* If false, an array will be returned with r, g, b components. | |
*/ | |
function get_average_colour($filename, $as_hex_string = true) { |
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 | |
/** | |
* single-{category_slug}.php || single-post-type.php || single.php | |
* | |
* Gets post cat slug, post type and look matching single- templates. | |
* If $categories is not empty, get the category slug, and look for single-{$category_slug}.php. If this file doesn't exist then return single.php. | |
* If $categories is empty, then check the post_type. If its not equal to post, then we are using a custom post type. Look for | |
* single-{$post_type}.php. If this file doesn't exist then use single.php. | |
* If $categories is empty and post_type is equal to post then use single.php. | |
* |
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
<button id="btnExpand" onClick="showMsg();">Click here to see all +</button> | |
<div id="welcomeMsg" class="closed"> | |
<div id="collapse-window" class="standard-window"> | |
<div class="inner-wrapper"> | |
<h5>In 2018, we also helped the following audiences:</h5> | |
<p>Lorum ipsum</p> | |
</ul> | |
</div> |
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
// Place this in wp-config | |
define( 'ACF_5_KEY', 'yourkeyhere' ); | |
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
function auto_set_license_keys() { | |
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
$save = array( | |
'key' => ACF_5_KEY, |
Add a new layer called "actions". Insert a keyframe at the very beginning of your animation and then insert other keyframe at the very end.
if(!this.loopsPlayed) {
this.loopsPlayed = 0;