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
wget https://raw.github.com/zpanel/installers/master/install/Ubuntu-12_04/10_1_1.sh | |
chmod +x 10_1_1.sh | |
./10_1_1.sh | |
STEP 1: Now start the installation process with hitting "y" on being asked. | |
STEP 2: Set your Geographic location - continent & time zone that suits your working environment, better set as your current country and don't set as server location | |
STEP 3: Now set the subdomain from which you want to access zpanel dashboard such zpanel.example.com |
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
First backup the file then proceed to editing | |
Use your favourite file editor , i am using nano | |
sudo nano /etc/ssh/sshd_config | |
find change port 22 to port (desired port number) | |
Note: Make sure the port is free and not used by any other app , make sure firewall doesn't block the connecting using this port, i recommend to be in range of 22001-22222 | |
Now restart the ssh |
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
This can be done with the powerfull Mod Security Web application firewall rules. The configuration is very simple. | |
So let me start: | |
Note: I assume that you have a running Apache web server. | |
# apt-get update | |
# apt-get install libapache-mod-security | |
Be sure that mod-security module is enabled. |
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 | |
$categories = get_the_category(); | |
$category_id = $categories[0]->cat_ID; | |
query_posts( 'cat='.$category_id ); | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<!-- You can use your loop content here, i have used roots wordpress theme --> | |
<?php get_template_part('templates/content', get_post_format()); ?> | |
<?php endwhile; else: ?> | |
<!-- DO SOMETHING IF NOTHING WAS FOUND --> | |
<?php endif; ?> |
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
AuthType Basic | |
AuthName "restricted area" | |
AuthUserFile /home/ismailfazal/public_html/protect-me-dir/.htpasswd | |
require valid-user |
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
.color-changing {background-color: #39f !important;} | |
@-webkit-keyframes colours { | |
0% {background-color: #39f;} | |
15% {background-color: #8bc5d1;} | |
30% {background-color: #f8cb4a;} | |
45% {background-color: #95b850;} | |
60% {background-color: #944893;} | |
75% {background-color: #c71f00;} | |
90% {background-color: #bdb280;} | |
100% {background-color: #39f;} |
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
::-webkit-scrollbar{ | |
height:16px; | |
overflow:visible; | |
width:16px; | |
} | |
::-webkit-scrollbar-button{ | |
height:0; | |
width:0; | |
} |
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
function autoset_featured() { | |
global $post; | |
$already_has_thumb = has_post_thumbnail($post->ID); | |
if (!$already_has_thumb) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} | |
} |