ItecSoftware Logo

Create Patch Files Using Diff And Patch Example

By Peter Gilg on
diff and patch example

Using diff to create batch files and subsequently running them against select files is such a convenient way to update, fix or change existing files, but many developers and system administrators simply don’t know much about them.

Here is a quick diff and patch example, how to use diff and apply changes for select files. Use diff –help to check out more options and flags.

NOTE: pay caution when using patching, any mistake or error are executed without warning or undo feature. ...

read more

Listed in Linux, Shell Scripting, Ubuntu

Tags: diff, patch

Track And Parse Twitter Messages Stream

By Peter Gilg on
parse twitter stream

With the increasing buzz about Twitter and its messages, more web developers want to incorporate a stream of Twitter messages into their websites.

Ever wanted to listen, track and parse tweets from a Twitter stream from an individual user? It’s quite an easy task, if you know the right URL’s to parse. Curl is a great little tool to get sources from almost any web resource and Curl has roots in Linux command like and PHP, just to name a couple.

Let’s ...

read more

Listed in Linux, Shell Scripting, Web Development

Tags: parse twitter feed, tweet, twitter

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