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”

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”

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”

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”

Simple and Lightweight JavaScript Table/Grid/List Sorter

This is more of a snippet extracted from one of my recent projects where I had to sort a list/grid of div’s. Yeah, I didn’t use tables for tabular data this time, but plain divs, although this snippet will work just fine with html table rows too.

Continue reading “Simple and Lightweight JavaScript Table/Grid/List Sorter”

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)”

Basic Steps Taken to Diagnose and Fix a Compromised or Heavy Resource Consuming Server

Recently one of my servers most probably got hacked (compromised). As I logged into my linode manager it said 200% bandwidth usage and it was growing at about 1gb per 1-2 mins (checked with iftop). So I opened a support ticket and asked a couple of linode fellows for help.

Continue reading “Basic Steps Taken to Diagnose and Fix a Compromised or Heavy Resource Consuming Server”