Laravel Render a View and Store the Contents in a Variable

Sometimes one may want to load a View with some PHP data passed to it and store it in a variable inside the Controller’s action. This rendered view data might be later passed to another view which is finally loaded and dumped to the user’s screen.

Continue reading “Laravel Render a View and Store the Contents in a Variable”

Parse and Read Excel Files (xls/xlsx) With JavaScript

Recently there was a requirement in one of my projects to parse Excel files (with xls/xlsx extensions) in the browser (using javascript ofcourse). So I looked around a bit on the internet and found these two useful libraries:

js-xls
js-xlsx

Lets see how to work with each of them.

Continue reading “Parse and Read Excel Files (xls/xlsx) With JavaScript”

Manipulate and Extract/Burst PDF Files Into Images, Text and Other Components with Docsplit

Docsplit is a command line utility written in Ruby (can be used as a Ruby library too) that can be used for splitting apart documents like PDF (Portable Document Format) into their components like plain text, single pages, page images, metadata (title, author, etc.).

Continue reading “Manipulate and Extract/Burst PDF Files Into Images, Text and Other Components with Docsplit”

Convert (Split) PDF Files into Images with ImageMagick and GhostScript

Split PDF

ImageMagick is an excellent open source set of software tools that helps with converting, editing, displaying and composing image files. Almost all programming languages have extensions or libraries to interact with the ImageMagick API, although you could also use it via command line.

Ghostscript is a set of tools that can interpret PostScript page description language and PDF files too, to render or rasterize them.

Continue reading “Convert (Split) PDF Files into Images with ImageMagick and GhostScript”

Admob Native Android SDK Integration with Phonegap/Cordova without Plugins

Just like we’ve Google’s AdSense program for all web publishers to generate revenue off their content, for mobile app developers there’s Google’s AdMob ads platform to monetize and promote their web app. PhoneGap is a great tool to convert JavaScript rich web apps to native mobile app. But when it comes to monetizing via ads, just putting Adsense code is not the solution as its meant for web usage only and is against Google’s terms and conditions. We’ll go through a simple process that I came across to integrate the native admob android sdk to our cordova apps and games without using any phonegap plugins.

Continue reading “Admob Native Android SDK Integration with Phonegap/Cordova without Plugins”

Export your Issues and Wikis from Github Repo and Import to Bitbucket (Migration)

Bitbucket Github Import Export

I just migrated a private repository from github to bitbucket. In this process, moving the entire codebase is not enough especially when you have hundreds of issues and lots of wikis – you need to keep track of them in the new repo. So with a few google searches, I did it in a few moments, although the information was pretty scattered – hence this tutorial!

Continue reading “Export your Issues and Wikis from Github Repo and Import to Bitbucket (Migration)”

Quick Tip: Fixing Locale Warnings/Notices Issues on Linux Server (or Desktop)

Some locale issues (errors, warnings or notices) might bug you on a linux box (in my case Ubuntu) when executing various commands:

Continue reading “Quick Tip: Fixing Locale Warnings/Notices Issues on Linux Server (or Desktop)”