ItecSoftware Logo

Install JSON PHP Extension on CentOs or RedHat

By Peter Gilg on
install json extension linux

JSON (JavaScript Object Notation) is the serialization format that is much lighter than it’s older sibling XML. In addition, JSON is native to JavaScript and it’s object oriented paradigm, hence makes it them perfect partners.

Instead of serializing your code manually, that is writing your own classes and functions, there is a PHP extension that takes on most of the work for you. You just have to install it.

Since I had numerous requests for info and questions relating to JSON extension ...

read more

Listed in Linux, Web Development

Tags: CentOS, JSON, php, Redhat

ImageMagick from command line

By Peter Gilg on
imagemagick from commandline

ImageMagick is such a cool and powerful tool to manipulate images, it’s a real shame if you don’t make use of it during your web design or photo album creation. You can resize, compose and convert all types of image files, it’s list of usability cases is endless. And best of all it’s free and available for almost every operating system.

If you don’t have it on your system yet, here is the imagemagick download location. You might also have it ...

read more

Listed in Linux, Useful Stuff, Web Development

Tags: command line, crop, image, imagemagick, resize, rotate

Silverlight For Ubuntu And Other Linux Distro’s

By Peter Gilg on
silverlight for ubunt -linux

It’s a real surprise that Microsoft supports a technology that works on Linux. But we don’t have to wonder, since Silverlight as a technology relies on it’s user base to end up as success or failure, it makes perfect sense. And that’s likely the only reason Microsoft has worked with Novell and Mono to create a Silverlight plugin for Linux.

Moonlight is an open source implementation of Silverlight for Linux/Unix systems. It comes in the form of a Firefox plugin, version ...

read more

Listed in Linux

Tags: Moonlight, Silverlight

Add Medibuntu Repository for Ubuntu 9.04

By Peter Gilg on
add medibuntu repository

Medibuntu is probably the most useful and popular non-included repository for the Linux community. It contains a lot of codecs for viewing or creating audio and video files, among a ton of other, useful utilities and drivers.

It’s a must have repository for Ubuntu for anyone wanting to listen to various music in different formats, as well as viewing videos encoded in multiple codecs.

Medibuntu contains a lot of applications, some of the most popular are:

Acrobat Reader Firmware for the ALSA sound system Google ...

read more

Listed in Linux, Useful Stuff

Tags: medibuntu, repository, ubuntu

Run script on startup, shutdown or reboot on Ubuntu

By Peter Gilg on
startup script ubuntu

Isn’t there always a need to run some command or program at startup? It’s easy on Windows with it’s startup folder, but what about on a Linux server? What’s the proper method to run a script at startup on Ubuntu?

Linux has different run levels, each designating a different user group with certain permissions. Some are exclusive for system processes, while others are available to regular users and admins. The file containing startup commands and the one we look at in ...

read more

Listed in Linux, Shell Scripting, Useful Stuff

Tags: runlevel, script, skeleton

Nginx and memcached module

By Peter Gilg on
nginx memcache

Memcache is traditionally used as a module inside server side scripts, such as PHP, ASP, ColdFusion and others. And it’s doing a terrific job, as long as it’s implemented correctly.

But if we look under the hood of the actual Memcache application, and I’m not talking about the PHP or ASP extension, but rather the executable that’s running as a daemon under Linux, it is a rather simple, database like application running in memory. Now there are two basic actions that ...

read more

Listed in Linux, MySQL, SEO, Shell Scripting, Useful Stuff, Web Development

Tags: apache, memcache, nginx, php

Exchange SSH keys and avoid logins and passwords

By Peter Gilg on
exchange ssh keys

If you’re working on remote systems, such as cloud instances or remote servers in a Linux environment, or as a system administrator or dba, changes are you’re often using ssh. Copying files between servers and workstations, creating database backups or using rsync to keep servers in sync are all tasks familiar to you.

I personally find it very annoying to always have to type in my login credentials. Not only is it less secure, but for my confortable nature being way ...

read more

Listed in Linux, Shell Scripting

Tags: key, key exchange, login, pasword prompt, ssh

Shell Batch Script to Loop through Files

By Peter Gilg on
batch script to loop through files

Another quick example of a tool belonging in an administrators toolbox. In our multi server hosting environment, we’re often in need for an automated, administrative command line task, and here is one to write a batch script to loop through files in the current directory and perform some actions on them.

Really, nothing is much simpler than that once we know how to it, it’s just that most administrators or developers don’t take the time to get into shell scripting. But little ...

read more

Listed in Linux, Shell Scripting

Tags: bash, scripting, shell

MySQL Insert If Not Exists

By Peter Gilg on
mysql insert if not exists

INSERT IGNORE is the syntax for something equivalent for MySQL INSERT IF NOT EXISTS. There is really no direct command matching the SQL Server version as outlined in this articles title, at least not in the current release of MySql.

The statement INSERT IGNORE and to some extent REPLACE INTO, do essentially the same thing, inserting a record if that given record does not exists.

MySQL insert if not exists

Let’s consider the following samples, where we want a record inserted if it’s ...

read more

Listed in Linux, MySQL, Web Development

Tags: insert if not exists, lamp, MySQL, replace into

Create ISO from CD or DVD in ubuntu

By Peter Gilg on
create-iso-from-cd-dvd

Newer laptops and some PC’s are now shipping without CD drives these days. And operating systems are more capable of handling ISO images and mount them as drives, creating an easy way to mimic CD drives or isolated drives.

But how do we extract data from a CD and then create ISO from CD? An ISO image that can be mounted in Ubuntu or any other Linux distro? What about extracting an ISO image from an existing CD?

While there are a ...

read more

Listed in Linux, Useful Stuff

Tags: cd, dvd, extract, iso, rip