Checking Mime-Type of External URL Using PHP
I was overwhelmed by Mime-Type while I was working for a project. The problem is I don’t know how to retrieve the mime-type from a file, particularly file from another host. This url is the one I want t check its mime-type. Why do I have to check it? Because it doesn’t have proper extension […]
Read more »Laravel 5 belongsToMany() by Using Pivot Table Example
Relationship using pivot table in Laravel 5? A method, belongsToMany(), is a part of Eloquent ORM in Laravel 5. It connects between tables and it has many to many relationship. In order to use it, you must have two models three tables.
Read more »Blade Template Doesn’t Work in Laravel 5
No, that’s not true the Blade Template is still working in Laravel 5, but its tag directive has been changed. For some of you who don’t read the Laravel development change log may not know about this. The documentation said that “For better security by default, Laravel 5.0 escapes all output from both the {{ […]
Read more »How to Add Form Class in Laravel 5
Many of you will question about the error like HandleExceptions->fatalExceptionFromError( array(‘type’ => ‘1’, ‘message’ => ‘Class ‘Form’ not found’ or FatalErrorException in 193a332e9290704ad006bafdbd047286 line 2: Class ‘Form’ not found. Hmm, you must be just upgrading your Laravel 4 to Laravel 5 weren’t you? Laravel 5 doesn’t include the Form class like the previous version. It […]
Read more »How to Change public To public_html On Laravel 5 Ubuntu
Laravel 5 has different level from previous version. It becomes simpler and it has different file structure. That was making me confused at the first time when I was trying to migrate from previous version. The odd is bootstrap/paths.php doesn’t exist anymore. Now, how do I set the public folder of my project to desired […]
Read more »Count Number of Files and Folders in a Directory Using Terminal
I Googled so much and can’t find any simpler method to count files or folders in a directory in Linux. I am using Ubuntu 14.04. If it’s only files and folders, it would be simple. Count Files and Folders $ ls -l | wc -l The wc -l command is read “WordCount lines”. It means […]
Read more »Changing Directory and Files Permission Recursively in Linux
I’ve discovered the hidden treasure at superuser to change the permission of directories or files recursively in a folder. Not quite simple, but straight. To recursively give directories read & execute privileges:
Read more »My Gruntfile.js Content Using Compass and Watch
Now, say you don’t know how to create Gruntfile.js manually just like I was. You’re desperately want to use Compass (grunt-contrib-compass) and Watch (grunt-contrib-watch) to develop your project. First, you have to install it in your project folder as node_modules: $ npm install grunt-contrib-compass grunt-contrib-watch That will install the Compass and Watch into node_modules directory […]
Read more »How To See Available Node.js Global Package Using NPM
Some of you might be very disturbed by a question of how to know Node.js packages which globally installed in your Ubuntu 14.04 LTS. Such a terrible nightmare. But, the nightmare should be vanished using this simple one liner: $ npm ls -g –depth=0 That line would be similar to: $ ls /usr/lib/node_modules
Read more »NPM Global As Reference of NPM Local
How to refer NPM Local to NPM Global? If you don’t want to install the packages locally because it’s wasting hardisk space you can use the packages which have globally installed. For example, you install the sass package globally: $ sudo npm install -g grunt-contrib-sass You don’t want to do the same for your project, […]
Read more »