WordPress- how to hide sidebar in front page

wordpress logo

Screen Shot 2015-05-16 at 10.49.58 AMWhile sidebar is important, sometimes it is not necessary for the homepage.

In this article, we will share how you can hide the sidebar on your WordPress homepage.

 

you can simply make the change by using the Theme file editor  below

First  Click Appearence ->Editor ,

then open your index.php (Main Index Template) and locate the following code:

<?php get_sidebar(); ?>

Then Replace the code with:

<?php if (!is_front_page()) {
get_sidebar();
} ?>

And thats it. Now your Front Page will NOT have the sidebar.

Screen Shot 2015-05-16 at 10.50.24 AM

solve periodic mouse lagg on elementary OS (Ubuntu flavor)

though my CPU ideal time is bery high, the mouse lagg or jerk most of the time
here is my top looks like

top

tried apt-get update and upgrade but no luck,

got this solution over google search and seems helpful.

Fix:

 

sudo -i
echo N> /sys/module/drm_kms_helper/parameters/poll
echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf


it is moving much faster and better, "PLEASE DONT CHANGE MOUSE SETTINGS AFTER THIS"

Download: The Database Hacker’s Handbook: Defending Database Servers (a $50 value) FREE

database hacking handbook

Today I wanna give this Awesome book to you guys for free.

In The Database Hacker’s Handbook, four of the world’s top security experts teach you to break into and defend the seven most popular database servers. The bad guys already know all the information in this book. You need to know it too.
Identify and plug the new holes in Oracle and Microsoft(r) SQL Server
Learn the best defenses for IBM’s DB2(r), PostgreSQL, Sybase ASE, and MySQL(r) servers
Discover how buffer overflow exploitation, privilege escalation through SQL, stored procedure or trigger abuse, and SQL injection enable hacker access
Recognize vulnerabilities peculiar to each database
Find out what the attackers already know

Download

 

Install whois CentOS / Ubuntu

jwhois is a whois client that accepts both traditional and finger-style queries. You can install the same using yum in Centos and apt-get in Ubuntu systems

Centos  :

yum -y install jwhois

Ubuntu

sudo apt-get install jwhois

 

In Centos/ Redhat systems you can run the command whois

# whois ajayadas.com
[Querying whois.verisign-grs.com]
[Redirected to whois.godaddy.com]
[Querying whois.godaddy.com]
[whois.godaddy.com]
Domain Name: AJAYADAS.COM
Registry Domain ID: 1545424198_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.godaddy.com
Registrar URL: http://www.godaddy.com
Update Date: 2013-05-12T10:55:01Z
Creation Date: 2009-03-04T22:04:18Z
Registrar Registration Expiration Date: 2017-03-04T22:04:18Z
Registrar: GoDaddy.com, LLC
Registrar IANA ID: 146

 

But in Ubuntu based systems you have to run jwhois

$ jwhois ajayadas.com

 

 

 

knockd – a port-knocking server – setup

knockd – a port-knocking server . It’s amazing and I feel it’s an essential tool to secure the ports.

Here i setup knockd server for Open-SSH in ubuntu

#1: Install Knockd

$ sudo apt-get install knockd

up on installation, you will get a message says knockd is disabled

#2 : First need to configure the files before we start the service , edit  knockd.conf file

$ sudo vim /etc/knockd.conf

this is how my file looks like

[options]

UseSyslog

[openSSH]
sequence = 7000,8000,9000
seq_timeout = 5
command = iptables -D INPUT -p tcp –dport 22 -j DROP
tcpflags = syn

[closeSSH]
sequence = 9000,8000,7000
seq_timeout = 5
command = iptables -A INPUT -p tcp –dport 22 -j DROP
tcpflags = syn

 

#3: Edit /etc/default/knockd file to enable the service

$ sudo vim /etc/default/knockd

my file looks like this

################################################
#
# knockd’s default file, for generic sys config
#
################################################

# control if we start knockd at init or not
# 1 = start
# anything else = don’t start
#
# PLEASE EDIT /etc/knockd.conf BEFORE ENABLING
START_KNOCKD=1

# command line options
KNOCKD_OPTS=”-i eth1″

#4 Start the service

 

sudo service knockd start #<– start server
sudo service knockd stop #<– stop server
sudo service knockd restart #<– restart server
sudo service knockd status #<– see status server

#5: how to use knock

From client machine try this (you might need to install knockd)

knock  -v   192.168.1.2 7000, 8000, 9000

you will see

hitting tcp 192.168.1.1:7000

hitting tcp 192.168.1.1:8000

hitting tcp 192.168.1.1:9000

 

Whala! now you can ssh into the machine

ssh ajay@192.168.1.1

 

WP Twitter Auto Publish Powered By : XYZScripts.com