Skip to content

Instantly share code, notes, and snippets.

View ismailfazal's full-sized avatar

Ismail Fazal ismailfazal

View GitHub Profile
@ismailfazal
ismailfazal / zpanel-install-ubuntu
Created September 23, 2014 06:34
Install zpanel on Ubuntu 12.04 LTS
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
@ismailfazal
ismailfazal / Ubuntu-ssh-port-change
Last active August 29, 2015 14:06
Ubuntu ssh port change
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
@ismailfazal
ismailfazal / ubuntu-apache-custom-server-name
Last active August 29, 2015 14:06
Ubuntu Apache Custom Server Name
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.
@ismailfazal
ismailfazal / wp-recent-post.php
Created May 12, 2014 11:56
Add wordpress recent posts from same category to single post page with infinite scroll
<?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; ?>
@ismailfazal
ismailfazal / .htaccess
Last active August 29, 2015 13:56
Password Protect a Directory Using .htaccess
AuthType Basic
AuthName "restricted area"
AuthUserFile /home/ismailfazal/public_html/protect-me-dir/.htpasswd
require valid-user
@ismailfazal
ismailfazal / Colors.css
Created February 11, 2014 21:41
Color Changing Div Windows 8 Style html5 & css3
.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;}
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}