About The Author

2016, December, 20

Setup bridge device on CentOS

#yum install bridge-utils

#mii-tools

#vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=virbr0
HWADDR=00:12:3F:4E:9E:BF
Read More
2016, November, 23

Night Security Light with Hacked PIR sensor

Security lighting is widely used as a preventive measure against intrusions on a physical piece of property. Since adequate lighting around a physical structure reduces the risk of an intrusion, security lighting can be used in residential settings to increase the feeling of safety. Presented here is a trusty security light activated by a passive infrared sensor, turning on only when a person (or other mammal) approaches. This battery operated security light provides rich illumination without harsh brightness great for kids rooms, the elderly, and for comforting your pets. An important feature of this security light is that it wakes up only at nighttime!

 

Described security light circuit design is centered around an inexpensive passive infrared (PIR) motion detector module, type HC-SR501. The PIR motion detector module is used here with an added ambient light detection (day/night) feature, supported by a generic photodiode. Following part is prepared to help you get started with your new HC-SR501 passive infrared motion detector module, so let’s start

Read More
2016, November, 23

How to copy tv remote features to IPTV/setup box remote

 

This example is taken from  NETTV remote

 

Bring both the remotes in front of each other (facing each other), with a distance of about 3cm-6cm. Now follow these steps:

 

1. Press and hold SET  buttons together for 5 seconds in NETTV. The LED will blink press till it light contiuses.

 

 2. Press & release the button of NETTV remove which you want to program, and then program that button on your tv remote which you want to program in your NETTV remote.

 

 3.  The LED will blink twice to indicate success.

Repeat same method for all buttons.

 

 

2016, August, 30

Migrate mail from one server to another with imapsync

Have you been in the situation where you needed to move everyone’s mail from one provider to another?  It’s a pain to do using the mail client one at a time, but with this guide, you’ll be able to create a csv with everyone’s info and run one command to fire it all off.  All you need is a Linux machine to do it.

First, you’ll need to install the epel repo (skip if you already have it):

Read More
2016, August, 30

iredmail migration from qmail with emails and mail box

  1. Log on to qmail server and export user account to csv and copy that file to new iredmail server.
    #mysql -uvpopmail vpopmail -pPassW0rd  -e " select pw_name,pw_gecos,pw_clear_passwd from test_com "  | sed 's/\t/","/g;s/^/"/;s/$/"/' > migration_list.csv
    #cat migration_list.csv
    raja.kc,raja ram kc (mc),1raja23
  2. login to iredmail server iRed source file to tools
    #cd 
    /root/iRedMail-0.9.5-1/tools
    #cat >create_mail_user_sql_migration.sh
  3. [root@mx tools]# cat >create_mail_user_sql_gen.sh
Read More
2016, August, 30

How do I export from MYSQL to CSV in mariadb on Centos 7?


If you can cope with table-at-a-time, and your data is not binary, use the -B option to the mysqlcommand. With this option it'll generate TSV (tab separated) files which can import into Excel, etc, quite easily:

% echo 'SELECT * FROM table'| mysql -B -uxxx -pyyy database

Alternatively, if you've got direct access to the server's file system, use SELECT INTO OUTFILE which can generate real CSV files:

SELECT*INTO OUTFILE 'table.csv'
    FIELDS TERMINATED BY',' OPTIONALLY ENCLOSED BY'"'
    LINES TERMINATED BY'\n'FROMtable

mysql -uvpopmail vpopmail -pPassW0rd  -e " select pw_name,pw_gecos,pw_clear_passwd from test_com "  | sed 's/\t/","/g;s/^/"/;s/$/"/' > migration_list.csv

2015, December, 22

bathroom status

Steps

 

 

  1. sudo apt-get install python-dev python-rpi.gpio
  2. sudo apt-get install python-beautifulsoup
  3. copy status.py to home directory
  4. touch index.html
  5. configure apache
    1.  sudo apt-get install apache2 -y
    2. extra(
      sudo apt-get install php5 libapache2-mod-php5 -y
      )
  6. chown -R pi:root /var/www/html
  7. run python status.py
    1. python status.py &
  8. browser ipaddress(192.168.1.10)

#Import All the Libraries
import threading, re, time, os, sys
import sqlite3 as lite
from time import strftime
from BeautifulSoup import BeautifulSoup
import RPi.GPIO as GPIO
import subprocess
import os
from time import sleep

#Setup GPIO Pins
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
#serverRoom
#GPIO.setup(5,GPIO.IN)
GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor2BoysRestRoom
#GPIO.setup(13,GPIO.IN)
GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor2MeetHall1
#GPIO.setup(20,GPIO.IN)
GPIO.setup(20, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor2MeetHall2
#GPIO.setup(12,GPIO.IN)
GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor3BoysRestRoom
#GPIO.setup(16,GPIO.IN)
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor1MeetHall1
#GPIO.setup(17,GPIO.IN)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
#Floor1BoysRestRoom
#GPIO.setup(23,GPIO.IN)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

Read More
2015, August, 02

Changing And Resetting MySQL Root Passwords

mysqld_safe --skip-grant-tables &

Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step # 3: Connect to the MySQL server using the MySQL client:

# mysql -u root

Output:

Read More
2015, July, 31

Kodi installation in raspbian

Login to raspbery pi with ssh(putty,xshell)


1.It’s always a good idea to upgrade the distribution and the Raspberry Pi 2 to the latest versions:$sudo apt-get upgrade --yes $sudo rpi-update
$
sudo reboot now
Read More
2015, July, 28

How to fix User Profile Service Failed the login Error

 

1.Boot computer with safe mode with F8
2.type in run as “regedit"
3.run as administrator
 
4.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
 

If you have two folders

Read More
2015, July, 08

Voice Recognition Software for Raspberry Pi

Install Instructions

(this requires git)
Here are the dependencies required to run and build:
sudo apt-get install libboost1.50-dev libboost-regex1.50-dev youtube-dl axel curl xterm libcurl4-gnutls-dev mpg123 flac sox

 sudo apt-get install git-core

git clone git://github.com/StevenHickson/PiAUISuite.git

cd PiAUISuite/Install/
./InstallAUISuite.sh

Read More
2015, June, 16

plug-in for KODI

- to watch latest movies and tv shows

In KODI, goto SYSTEM - File Manager

 

  1. click "Add source Path"
  2. type in "http://fusion.tvaddons.ag/"
  3. Name the media Source as ".fusion"

Installing full package - HubWizard

Goto SYSTEM - Settings - Add-ons,

  1. click on "Install from zip file"
  2. click on "fusion"
  3. click on "start-here"
  4. click on "plugin.video.hubwizard-x.x.x.zip"
Read More