Alias configuration settings in apache

In some cases, we want to place our project folder outside of htdocs. This time Apache not understand that project and we can not run it in browser.

Apache provides alias configuration settings which will be placed in httpd.conf and we can run any app even deployed in out side of htdocs.

In my machine, I have installed xampp in Windows 7. I have created a folder “E:/test” and it contains “index.html”. Assume “test” is a one of the project directory which is placed in outside of htdocs. So In order to access E:/test/index.html,  we need to create alias configuration as follows in httpd.conf file and restart the server.


Now you can access the index.html by entering the URl

http://localhost/test/index.html  (you can add port in url if you have changed default port 80)

Some useful SSH commands

The following commands are often used by developers in Linux environment. This is very helpful for peoples who ever entering Linux world .

For windows user, you can try this commands using CYGWIN sofware. But I am not sure that all the below commands are working there or not.

Commannds Comments
cd Change directory
cd .. Change directory one level back
cd ~ Change directory to root
pwd Print working directory (Display current directory)
mkdir test Create directory
touch test.php Create file
rmdir test Remove directory
rm test.php Remove file
cp test.php test/ Copy file to another directory
cp test.php test_old.php Copy file and create as new file “test_old.php”
cp -r test/ test2 Copy folder and create as new folder “test2”
ls Directory list
ls -alh  Directory list with detailed information . This is often used by developers. for eg: we want to see the size of file or file modification date
ls -lrt
ls *.php List only specified extension
clear clear window
tab Tab-completion makes typing out long file paths much faster!
mysql -u mysqluser -p mysqldatabase | gzip > db.sql.gz Dumb the sql file with gZip
find ./ -iname “test.php” Find file
grep -iR test./ Find file which is having the string “test”
chmod 755 test.php
chmod 644 test.php
Change the mod of file
view test.php Read only
vi test.php Read/Write
:q! Quit without save
:x! Quit with save
/asik Search

Angularjs sample application

This application combined with angular-seed & ui-router module which will help people to understand SPA (Single-page-application) navigation’s using AngularJS

This project followed the following concepts
> Directory structure followed from angular-seed (90%) (https://github.com/angular/angular-seed)
> Bootstrap template used (Third party template, http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/)
> Routers (ui-router) (https://github.com/angular-ui/ui-router)…Also please check http://www.amasik.com/angularjs-ngroute-vs-ui-router/
> Controllers
> Factories
> Directive
> Module Specific (As per angular-seed project)
> Third party modules (Datatable, Form validation, d3 chart..etc..,)

Navigation’s:

> Register
> Login
> Logout
> Dashboard
> Reports
> Customers – List, View & Edit
> Add Customer

Note: All data coming from mock JSON file.

Demo: http://amasik.com/demo/angularjs/angular-app/
Download:  https://github.com/mail2asik/angular-app

Wrap (Break) the word in sentence

The following class is doing word wrapping perfectly.

Encode or Decode html entity from string

Decoding the HTML entity

 

Encoding the HTML entity

 

Get html contents from iframe using jquery

The following code works fine in all browsers for getting HTML contents from iframe.

Create thumbnail image in codeigniter

Adding the following method as custom helper file and check the below sample.

Sample:

Remove directory and its sub folders & files in codeigniter

We can extend the core directory helper.  Creating a new file as MY_directory_helper.php and add the following code in helper file to remove directory and it’s sub folders &  files.

 

Remove index.php in codeigniter using htaccess

Add the following code in htaccess file and place this in project root directory.

 

 

Perform ajax call in codeigniter

You can simply add the following jquery code to perform ajax using codeigniter

 

© 2017 Asik Blog

Theme by Anders NorenUp ↑