To change the bower’s component installation directory as you want you first need to create a .bowerrc file and define the custom location in this .bowerrc like the below. { "directory": "yourCustomDirectoryLocation" } Then as usual just make a bower.json file where you will write down all the dependencies for your projects like the below. { "name": "YourProjectName", "description": "Description of your project", "homepage": "http://yourProjectUrl.com/", "author": "Yourname <your@email.com>", "dependencies": { "bootstrap":">= 3.0.0", "jquery": "~2.0.3" } } now run bower install …
Blog Posts
To avoid misspelled user typing of address for searching places or anything by Google map, you can place only address suggestion dropdown provided by Google places API. It’s so easy to integrate. Just add the following Javascript code before </head> tag. <script src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=places"></script> Now let’s assume your input field/ address field code in your form is- <input type="text" class="form-control" id="locationInput" placeholder="write your address"> Now put the following javascript code after adding the google api javascript file source. <script> (function(){ var …
Very interesting code snippet that is about to display colorful output with PHP-CLI
It’s not so easy to write Test Cases for slim framework. But I tried by autoloading SlimEnvironment class by requiring applications global autoload script. And after that I just created a Slim mock environment to handle the test case environment. If you have any further idea about to please share with me. Thanks in advance!
{ "require": { "php": ">=5.3.0", "propel/propel1": "1.*", "willdurand/propel-geocodable-behavior": "dev-master" }, "autoload": { "psr-0": { "": "src/" } } } By adding "willdurand/propel-geocodable-behavior": "dev-master" in composer.json you can use this custom GeoCodable Behavior. Or you can download GeocodableBehavior.php from GitHub repo for this behavior. and put it in /src directory or somewhere, then register this class in your application autoloader. If you want to perform all this task by composer then just run composer update and everything will be ready …