Handy Bash Commands

Standard

A few commands I use frequently but sometimes forget.

Concatenate mutliple PDF files

pdftk *.pdf cat output out.pdf

Convert a PDF page to an image

convert -density 150 input.pdf -quality 90 output.png

Batch resize images

mogrify -resize 640x480 *.{png|jpeg}

Crop an image

convert input.png -crop 0x4000 output.png

Create a GIF animation from images (10s delay, loop endlessly)

convert -delay 10 -loop 0 *.png animation.gif
Advertisement

WordPress has a Linux client?

Standard

Why haven’t I known about this earlier?

While going through my profile account I discovered there’s a desktop client for Linux and specifically an Ubuntu package.

I immediately installed. You can download it here or run this code to download and install it on you Ubunu machine:


cd ~/Downloads
wget -O wp.deb https://public-api.wordpress.com/rest/v1.1/desktop/linux/download?type=deb&ref=getapps
sudo dpkg -i wp.deb
rm wp.deb

If you’re on a non-debian machine you canalso get the tarball and use your systems’ package manager to install it:


wget -O wp.tar.gz https://public-api.wordpress.com/rest/v1.1/desktop/linux/download

Now you can enjoy blogging within your Linux machine without openning a web browser.

Update: As a matter of fact, correct me if I’m mistaken, the client is a Unity web app.

Maps for Linux & Ubuntu

Standard

Everyone uses digital maps these days, I assume. At least I do. Since I’ve been using them more often lately, I checked if there are any apps for Linux and especially Ubuntu. The search returned 4 apps.

Maps (aka gnome-maps)

is a map application for GMONE. Its use is slick and fast. It is supposed to be simplistic
Search and directions is functional (based on MapQuest if I’m not mistaken) but geolocation isn’t. Moreover, the satellite imagery is not available at high resolution.

Maps_015.png

Continue reading

Purism introduces the “Pure OS” and its “Pure” privacy-respecting laptops

Standard

Purism Offers Free (as in Freedom) Laptops (Video)

Purism uses its own OS, PureOS, which is a Debian derivative by way of Ubuntu and other members of the Debian-derivative family, but with no taint of proprietary code. Now imagine all the binaries stripped out of the Linux kernel, making it closer to the FSF ideal of a 100% free operating system than the Linux kernel in use almost everywhere else.

They’re still using a proprietary BIOS, but have people working on a Free one. The main thing, though, is that Purism is working to give you all the privacy and freedom they can — with more coming as they keep working to replace proprietary bits of the OS, BIOS, and hardware drivers with Free Software. Best of all, even if you don’t need a new laptop right now, you can download PureOS and run it on any compatible hardware you already own.

This is something nice to hear. What’s even more appealing is the hardware switches for the microphone/webcam and bluetooth/wireless and the focus on the screen hinges.

PS: The 15″ model doesn’t come with an RJ45 but does come with a usb adapter, as per the website.

Official Website

When power is provided, all hardware components spin up, and load the firmware they have burned onto them, such as the hard drive or solid state drive, the BIOS then loads firmware for additional components, be that the memory controller, system management controller, embedded controller, USB, and/or GPU. At this point the BIOS hands off to a boot loader, Purism uses GRUB, which is a completely free boot loader. A boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software, Purism uses a completely free version of Linux. The kernel, in turn, initializes the rest of the operating system, Purism uses a completely free version of GNU. GNU allows for thousands of free software applications to run on top of it, and the distribution that Purism uses to bundle completely free software applications is Trisquel.

Solution for “Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)”

Standard

I recently faced a problem opening some JPG images that I have downloaded somewhere over the internet, probably Twitter. So I though I’d share the problem and the simple solution.

When I tried opening an image I got the following error

Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)

As the error states I was trying to open an image with a JPEG extension but which was not actually a JPEG image. To further verify this and know the actually format I ran this command in the terminal:

file file_name.jpg

which will give you something like this:

PNG image data, 346 x 480, 8-bit/color RGB, non-interlaced

The solution was to imply replace .jpg or .jpeg with the appropriate format, .png in this case.

References

I can’t open .jpg files, what to do?, Ask Ubuntu
Why am I getting the error: “Not a JPEG file: starts with 0x89 0x50”, StackOverflow