Posts

Password Validation with Regex

Here are the few examples which will be useful for you, Minimum 8 characters at least 1 Alphabet and 1 Number: "^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$" Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character: "^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$" Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$" Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}" Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}"

Setting up Virtual Host in Local machine (Wamp Server)

Hi !!! Today i am going to share how to set up the virtual host in local machine with the Apache Server.  In my tutorial i have used WAMP server. What is Virtual Host? Virtual Host is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers). This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same host name. How to setup Virtual Host in Server? 1. Add Host to your Hosts file. For adding you have to locate below file, C:\Windows\System32\drivers\etc\hosts Open "hosts" file in notepad and add below line after 127.0.0.1 Localhost 127.0.0.1       yourwebsite.local Here "yourwebsite.local" will point to your server on local machine. 2. Next step is to enable vhosts in apache. Open your httpd.conf file which is located under, C:\wamp\bin\apache\apache2.2.22\conf  Here, You have to uncomment below...

Ghostscript Installation and Configuration in Windows 7

Image
Ghostscript Introduction: Ghostscript is a library which is used to convert any file extension to any file extension. For eg, if you want to convert pdf to image or image to pdf we can convert easily using Ghostscript. And yes, you can also use Imagemagic to do the same task but, Compare to Imagemagic, Ghostscript executes fast and uses less file space. Below are the results for your reference, Using `convert` to convert from PDF to PNG, with 300 density: it took 426 seconds and 51mb Using `gs` to convert from PDF to PNG, with 300 density: it took 135 seconds and  39mb disk space Also I have achieved further time improvement by using jpeg, Using `gs` to convert from PDF to JPEG with 300 density and 100% quality: it took 32 seconds and 153mb disk space Ghostscript Installation: Download and install Ghostscript with the correct version and Operating system, http://www.ghostscript.com/download/gsdnld.html In my case, I have installed Ghostscript 9.1...

Enable SSL in WAMP server

How to enable SSl on Wamp Server(apache2) - HTTPS Configuration In this article, I will show how to Configure/Enable SSL in Wamp Server.I have installed wampserver with apache 2.2.12 and php 5.3.5. I have to configure the Open SSL server. How to Setup HTTPS SSL on WAMP Server for apache 2.2 1. Install WAMPServer 2. Open Control Panel 3. Click System >> Select Advanced System Setting >> Select Environment Variables. 4.Create new system variable OPENSSL_CONF: Value: C:\wamp\bin\apache\apache2.2.12\conf\openssl.cnf 5. Create a SSL Certificate and Key for the Web Server Open command prompt and Run the following commands: > cd wamp\bin\apache\apache2.2.12\bin > openssl genrsa -des3 -out server.key 1024 > copy server.key server.key.org > openssl rsa -in server.key.org -out server.key > openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt -config C:\wamp\bin\apache\apache2.2.12\conf\openssl.cnf >openssl req -new -ne...

Memcache Installation in PHP (Wamp Server)

what is Memcache? Memcache is a caching system used to speed up web applications by holding small pieces of arbitrary data, it could be broadly compared to the $_SESSION variable in PHP, but memcache works across the whole application not just on a per user basis and has been successfully proven to make great gains in speed increases on web applications. Memcache was designed with Linux in mind and not windows, so it has posed some installation issues because Windows users are not so familiar with having to compile code from source as memcache does not come with any installation software. Installation: - Download this package, here - Unzip Memcached application in C:/memcached folder - Open command prompt, Type below command to install C:\memcached>memcached.exe -d install  - Now its time to start the Memcache server  C:\memcached>memcached.exe -d start (or)  C:\memcached>net start memcached The memcached service was started successfully. Hope ...

SPHINX with PHP and MySQL

Hope you guys are doing good! First let me tell you Why Sphinx is more faster than MySQL. Cuz Sphinx will search in Document format where as MySql search in table format. Now, how exactly it will work MySQL with Sphinx? 1. First you have to Download Sphinx-2.2.1-beta-win32.zip or Sphinx-2.2.1-beta-win32-pgsql.php. FYR, http://sphinxsearch.com/downloads/beta/ 2. Then you have to extract the files in C:/Sphinx 3. Copy your  sphinx.conf.in file and paste it under bin folder and rename it to sphinx.conf. 4.  Now open command prompt by pressing Windows -> cmd 5. Now you have to create service C:/sphinx/bin > searchd --install --config c:/sphinx/bin/sphinx.conf --servicename SphinxSearch 6. Then you have to create Log file under C:/Sphinx/log 7. Create PID file under log "searchd.pid" 8. Now its time to start the SphinxSearch server Go to Control panel -> Administrative tools -> Services -> SphinxSearch --Rightclick-> Properties -> S...

Github Installation

Hi Friends, After long time, I came to my blog and thought to share something new. So i picked up GitHub installation and How to use GitHub? Its very easy to use GitHub All you need to do is, Open github.com -> Sign up your account Here you can create your own repository and you can share the link with your colleagues. How to install and use Git in Windows ===================================== 1. Download git from http://git-scm.com/downloads 2. Right Click on downloaded installer 3. Click ‘Run as Administrator’ 4. Install using default settings except for “Adjusting your Path Environment” Choose “Use Git from the Windows Command Prompt” 5. Start a Windows Command Prompt 6. CD to a new directory where you want to store your local repository 7. run “git clone <repository path>” e.g. “git clone https://github.com/YOUR_REPOSITORY_PATH” 8. Enter your github username and password 9. You can now make changes to the local repository and run any git command as and when it’s...