Categories
Uncategorized

Simple Date Picker using AngularJS Directives

Download this file. Extract it’s contents onto your web root folder (or your directory). Open the directory in a web browser and you will see something similar to this.

Birth Date Form

To use this directive (Angular’s very own HTML 5 web components), you can use the following HTML tag in any forms after initializing the Angular Application.

<body ng-app="bdayApp">
  ....
  <bday-form/>
  ...
</body>

Few browsers do not handle the self closing tags all that well, so using the following syntax might help in that case.

<body ng-app="bdayApp">
  ....
  <bday-form></bday-form>
  ...
</body>

Also make sure you include the following lines anywhere on the page where you want to use the date picker. Note that it is not necessary to include the Javascript files before you use the date tag, it works even if the code is loaded after the contact tag is loaded. Bootstrap 3 is also being used to render the UI, so it has to be included before the tag is placed in the web page.

 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script>
<script src="Angular/bdayApp.js"></script>

Demo

Usage:

<!DOCTYPE html>
<html lang="en">
<head>
 <title>Bootstrap Example</title>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body ng-app="bdayApp">
 <bday-form/>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script>
<script src="Angular/bdayApp.js"></script>
</html>

 

 

Categories
Uncategorized

Reusable Responsive Contact Form using HTML 5 Web Components & Polymer

Github
Download the files from git.
Run the install.php from your browser (Make sure your directory is writable by the web server you have installed).

contact form install

Open your web directory address in a browser and you should see a demo contact form. You can embed these contact forms by simply placing the following tag in your template anywhere to reuse the contact form.

Also make sure you include the following lines anywhere on the page where you want to use the contact form. Note that it is not necessary to include the Javascript files before you use the contact form tag, it works even if the code is loaded after the contact tag is loaded.

  

Demo

Usage:



    
  
  
     

contact form

 

Categories
Uncategorized

HHVM + WordPress Permalinks Issue Resolved

Once HHVM (Hip Hop Virtual Machine) is installed and running, you might have an issue that shows only the Homepage of your WordPress site and the other links lead to a 404 not found. This issue can be quickly resolved.

Open the HHVM proxy configuration file using your favourite editor with root privileges.

sudo nano /etc/apache2/mods-available/hhvm_proxy_fcgi.conf

Add the following line to hhvm config file after editing the path to your WordPress installation. The following line of code assumes that the WordPress installation is in your root web directory.

ProxyPassMatch ^(?!\/wp\-admin\/)([^\.]+)$ fcgi://127.0.0.1:9000/var/www/html/index.php

Your HHVM proxy configuration file should look somewhat similar to this

ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1
ProxyPassMatch ^(?!\/wp\-admin\/)([^\.]+)$ fcgi://127.0.0.1:9000/var/www/html/index.php

Now restart the HHVM

sudo service hhvm restart

This should take care of your permalinks issue.

The above HHVM proxy configuration file makes sure that all the php request are routed through HHVM. But if you want to route only specific php requests for a particular website or directory from your server to HHVM, then just add the config lines in your Virtual Hosts section of your apache configuration file. For example,

<VirtualHost *:80>
    ServerName yoursite.com

    DirectoryIndex index.php
    DocumentRoot /var/www/html/yoursite

    ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/yoursite/$1
    ProxyPassMatch ^(?!\/wp\-admin\/)([^\.]+)$ fcgi://127.0.0.1:9000/var/www/html/yoursite/index.php

  </VirtualHost>  

  <VirtualHost *:443>
    ServerName yoursite.com

    DirectoryIndex index.php
    DocumentRoot /var/www/html/yoursite

    SSLEngine On
    SSLCertificateFile   /etc/ssl/certs/yoursite.crt
    SSLCertificateKeyFile    /etc/ssl/private/yoursite.key
    SSLCACertificateFile  /etc/ssl/certs/yoursite.ca.crt

    ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/yoursite/$1
    ProxyPassMatch ^(?!\/wp\-admin\/)([^\.]+)$ fcgi://127.0.0.1:9000/var/www/html/yoursite/index.php

</VirtualHost>
Categories
Uncategorized

Just Upload – Transfer files without User Registration

Here is a small app that I have written to be able to send files to emails without user registration.

Link

Categories
Uncategorized

Implementing an ATM App using js

This is a simple ATM app that uses HTML 5, CSS3 & js.

atm

Code 

Demo1

Demo2

Use Card Number: 9299455566667745
Pin: 1993

Categories
Uncategorized

Remove HomeGroup icon from the Windows 8.1 desktop

Well this is a bug that has been there in Windows 8 and still persists in Windows 8.1 as well. At times the HomeGroup icon is displayed automatically on your desktop without your permission. Wondering how to delete it? Its very easy if you follow the 3 steps below.

Step 1

Right Click on your Desktop and select the Personalize option.

Also read: Activating speech recognition in Windows 8.1

Step 2

Now click on the Change Desktop Icons option displayed on the left.

Step 3

If the box next to the Network is checked then uncheck it and then click on Apply or else check it and click on apply and then uncheck it again and apply to make this irritating icon to go away.

Also read: How to take screenshot in windows 8.1

Hope that Microsoft will fix this HomeGroup icon bug soon in their Windows 9 OS which is expected to be announced later this year. If you have any queries regarding this issue then please feel free to leave a comment below.

Categories
Uncategorized

Google Privacy Issue Fixed

Most of us aren’t aware of the fact that there is an issue with Google’s Privacy Policy. Well the problem is that Google allows those people who add you to their circles on Google+ to email you by default without even having your email address. This is a major concern for many folks out there cause they would end up with tons of spammy emails in their Gmail inbox everyday. The good thing is you can easily opt out of this by just clicking on the gear symbol on the top right. Now select Settings, scroll down the general category to Email via Google+ and select the classes of people who are able to send you emails. Lets hope that we wont have to deal with this Google Privacy Issue anymore.

Also read:  Learn “How to use Google Effectively” in under 5 minutes!

Categories
Uncategorized

Stream LIVE Video from your Phone

To use your Android Phone to stream Live Video all you need to do is install the following app from Google Play and you are ready to go.
IP Webcam
Click here to Download
This app turns your phone into a network camera with multiple viewing options. View your camera on any platform with VLC player or web browser. Stream video inside WiFi network without internet access. Use IP Webcam with tinyCam Monitor on another android device or with third-party MJPG software, including video surveillance software, security monitors and most audio players. Videochat support (e.g. Skype, Chatroulette, only video stream for Windows only via an universal MJPG video streaming driver).

Also read: Battery Doctor – A real Battery Saving app

Categories
Uncategorized

Activating speech recognition in Windows 8.1

Steps to activate Speech Recognition in Windows 8/8.1

  • Go to the control panel and type in “speech recognition” in the search bar and click on the “start speech recognition”.
  • You will go through the starting stages where you will be needed to test your microphone settings and your voice and then you are ready to go.

Also read: Skype Audio Not Working – Fix

Categories
Uncategorized

Skype Audio Not Working – Fix

Few months ago I had faced a problem with my desktop Skype, my audio wasn’t audible to the other person. I checked whether my webcam was in working condition. I use MS LifeCam VX-2000 and it has a built in microphone. However after checking with other system tools like Speech recognition in Windows 8, I found that my microphone was in working condition. So I checked the Skype microphone settings and found that the default microphone setting was set to my Creative Sound Blaster. I quickly changed it as shown in the following screenshots and everything was working fine as usual.

  • Open your Skype for desktop PC and then click on Tools.
  • Select Options.
  • Now go to the Audio option and you can set the type of audio input that you want to use.