Posts

HackUB (Hackathon Ulaanbaatar) - Organizing event

Everything starts with something, and there is always first time. So this August with bunch of friends we decided to organize an event. And possibly biggest event for Mongolian IT crowd. We never actually organized any event though. All had none to small experience about organizing anything. But anyhow we started planning it. So as usual this is reminder for me. Even event is fully planned, all the speakers even the most responsible one could cancel out last minute. So always follow up speakers and prepare plan B C for them, as replacements. And if that happens just casually change speaker and be truthful to audience. They won't panic as much as you do. Be prepared for stuff. For this event everything came to in place on last minute. Printing, venue, even funding got accepted on last minute. So try to reduce those LAST MINUTE things. Those things will break your schedule and leave a huge impact. At least try to print materials that won't change as soon as possible.  Get ...

Maximum function nesting level of '100' reached

I've been having trouble with Laravel 5.2. Somehow on rare occasions I've got bla bla bla something maximum function nesting level 100 reached. Thinking that might be cause of of doing something wrong, ideally I love to nest templates and recycle them as much as possible. This applies to model, controller logic too. So naturally I was thinking that is causing that problem. But fixing was impossible. I've started hardcoding them instead making things dynamic until I felt really shitty. So investigating that issue guided here https://laracasts.com/discuss/channels/general-discussion/l5-maximum-function-nesting-level-of-100-reached-aborting?page=3 Which is turns out x-debug just doesn't want to nest functions till 100 level by default. Which is actually good to figure which things going over the limit. But L5 just likes to go deeper than that. So end solution was increase xdebug nesting like this. xdebug.max_nesting_level = 112 Not an actual fix or something rather j...

How to implement Blueimp with Laravel 5

Spent few hours trying to figure out how to implement blueimp image upload with laravel 5. After lot of trial and error finally i'm able to implement. So here it goes. 1. Download blueimp from source. https://github.com/blueimp/jQuery-File-Upload 2. Create controller in laravel php artisan make:controller UploadController you can name your controller anything for me it's UploadController. 3. Copy class content of https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php into UploadController. 4. On laravel's routes.php create your ajax call for me it's [code] Route::post('user/upload', function(){ //Points to custom folder $options['upload_url'] = url('/images/uploads/'); //Uploads custom folder $options['upload_dir'] = public_path().'/images/uploads/'; //Create handler with options $upload_handler = new App\Http\Controllers\UploadController($options); }); [/code] 5. one importa...