Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Unix signals list

Up
vote
Down

Processes are required to respond to signals sent to them. This is one way a user can communicate with signals and control them.
Signals are asynchronous events that can occur to a running process and may be caused by hardware, software or users. Signals are numeric integer messages that have been predefined so they understand what these signals mean. When a process receives a signal, that process must respond to the signal. Uncaught signals will cause default actions to take place, which often means the process is terminated. If you use “kill -l”, or “trap -l” you can get a list of available signals:
read more...
mail this link | permapage | score:9180 | -aweber, December 31, 2010

Tutorial: Android development environment on Fedora 14

Up
vote
Down

This tutorial describes how you can set up a development environment for building Android apps on a Fedora 14 desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms). read more...
mail this link | permapage | score:9174 | -falko, February 1, 2011

Open source Cloud Computing with PHP and MySQL

Up
vote
Down

In this article you will learn how Aptana makes it easy to develop applications based on PHP and MySQL, and how to deploy them to the cloud. Also explore some of the critical design differences between a cloud application and a traditional N-tier application. read more...
permapage | score:9171 | -solrac, May 18, 2009

Scripting: Bash Array Tutorial

Up
vote
Down

An excellent introduction to bash arrays including 15 examples...
$ cat arraymanip.sh
#! /bin/bash
Unix[0]='Debian'
Unix[1]='Red hat'
Unix[2]='Ubuntu'
Unix[3]='Suse'

echo ${Unix[1]}

$./arraymanip.sh
Red hat
read more...
permapage | score:9168 | -Ray, June 7, 2010

Tutorial: Build a C/C++ memory manager

Up
vote
Down

As a developer, one of the most powerful tools that C/C++ arms you with to improve processing time and prevent memory corruption is the control over how memory is allocated or deallocated in your code. This tutorial demystifies memory management concepts by telling you how to create your very own memory manager for specific situations. read more...
permapage | score:9160 | -BlueVoodoo, February 23, 2008

Linux Kernel Debugging Tools

Up
vote
Down

Your Kernel just crashed or one of your drive is not working!! What do you do?

Well, this article gives an introduction to some kernel debugging tools for Linux. These tools makes the kernel internals more transparent. These tools help you to trace the kernel execution process and examine its memory and data structures.

The tools discussed here are :

1. Kernel debugger, kdb

2. Kernel GNU debugger, kgdb

3. GNU debugger, gdb

4. JTAG- based debuggers.

Of the mentioned tools, the kdb and kgdb were introduced as patches to the kernel code. The plain debugger gdb doesn’t need the patching process with kernel code. The JTAG (Joint Test Action Group) based debuggers are hardware assisted and powerful tools, but are expensive.

Here I will explain the installation and usage of the kdb tool. The rest of the tools are briefed. read more...
mail this link | permapage | score:9154 | -shyju, November 15, 2008

perl1line.txt: A handy Perl script collection

Up
vote
Down

The ultimate goal of the Perl One-Liners Explained article series was to release the perl1line.txt file. Last week I finished the series and now I am happy to announce perl1line.txt - a collection of handy Perl one-liner scripts.

The perl1line.txt file contains over a hundred short Perl one-line scripts for various text processing tasks. The file processing tasks include: changing file spacing, numbering lines, doing calculations, creating strings and arrays, converting and substituting text, selective printing and deleting of certain lines and text filtering and modifications through regular expressions.

The latest version of perl1line.txt is always at:
http://www.catonmat.net/download/perl1line.txt
Enjoy! It took me over 3 years to write all the one-liners down. read more...
mail this link | permapage | score:9126 | -pkrumins, November 21, 2011

Build Apps with Android SDK, Eclipse, PhoneGap (Ubuntu 10.10)

Up
vote
Down

This tutorial describes how you can set up a development environment for building Android apps on an Ubuntu 10.10 desktop using Eclipse, the Android SDK, and PhoneGap. I will describe how to build Android apps from the command line with PhoneGap and from the GUI with Eclipse and PhoneGap and how to test them in an Android emulator and on a real Android device. PhoneGap allows you to develop your Android applications using web technologies such as HTML, CSS, and JavaScript (e.g. with JavaScript libraries such as jQuery/jQTouch), and it will turn these web apps into native Android apps (in fact, PhoneGap supports multiple platforms such as Android, iPhone, Palm, Windows Mobile, Symbian, so you can use the same sources to create apps for multiple platforms). read more...
mail this link | permapage | score:9126 | -falko, January 27, 2011

Tutorial: Creating graphics with PHP

Up
vote
Down

Imagine creating Web-page graphics dynamically using just code. Creating and manipulating images is yours for the doing with the power of PHP. This tutorial steps through using the GD library, showing you how to create and alter images on Web pages. It starts with the GD construct, and then builds on it to showcase graphics techniques. read more...
permapage | score:9125 | -jmalasko, July 8, 2008

Eclipse: Use gdb from CDT

Up
vote
Down

The GNU Debugger (gdb) is the most popular open source debugger in use. Learn how the Eclipse C/C++ Development Tooling (CDT) talks to the GNU Debugger. This concrete example of CDT-debugger interaction should be helpful for anyone wishing to interface a custom C/C++ debugger from CDT. read more...
permapage | score:9114 | -jmalasko, July 4, 2008

Tutorial: Build an Arduino laser game

Up
vote
Down

Arduino is an easy-to-use electronics platform. The entire platform, both the hardware and the software, is completely open source, and the language is loosely based on C/C++. Whether you're new to Arduino or a seasoned builder, this project has something for you. There's nothing quite as satisfying as creating an interactive physical object. Use this tutorial to create an interactive laser game called "'Duino tag," where players can play tag using devices built nearly from scratch. read more...
permapage | score:9111 | -solrac, February 2, 2009

DWR Java Ajax: User Interface (pdf)

Up
vote
Down

Caution: this article is in PDF format. -Ed.

In this article, the author of the book DWR Java Ajax Application shows how to develop samples based on DWR, which demonstrate how to dynamically change the common user interface elements such as tables, lists, and field completion. It also covers steps to make a dynamic user interface skeleton for these samples.

The section on dynamic user interfaces shows how to get started with a DWR application, and it presents a user interface skeleton that will be used to hold the tables and lists sample, and the field completion sample.

The article is divided into the following three sections:

  • Creating a Dynamic User Interface—starts with creating a web project and a basis for samples mentioned in this chapter
  • Implementing Tables and Lists—shows us how to use DWR with them
  • Implementing Field Completion—has a sample for typical field completion
read more...
mail this link | permapage | score:9105 | -Niraja Mulye, December 30, 2008

Introduction to Perl one-liners

Up
vote
Down

Perl one-liners are small and awesome Perl programs that fit in a single line of code and they do one thing really well. These things include changing line spacing, numbering lines, doing calculations, converting and substituting text, deleting and printing certain lines, parsing logs, editing files in-place, doing statistics, carrying out system administration tasks, updating a bunch of files at once, and many more. Perl one-liners will make you the shell warrior. Anything that took you minutes to solve, will now take you seconds! read more...
mail this link | permapage | score:9094 | -pkrumins, May 28, 2012

Programming the Sony PS3 SPE cores under Linux

Up
vote
Down

Take even greater advantage of the synergistic processing elements (SPEs) of the Sony PS3 in this installment of Programming high-performance applications on the Cell BE processor. Part 2 looks in depth at the Cell Broadband Engine processor's SPEs and how they work at the lowest level, while Part 1 showed how to install Linux on the PS3 and explored a short example program. read more...
mail this link | permapage | score:9088 | -Ida Momtaheni, February 21, 2007

perl dispatch table examples

Up
vote
Down

Dispatch Table: The fancy name for a hash of code-refs...
In perl, code is a first class data type... you can talk about it in the same way you would talk about arrays or hashes, you can take references to them (giving you a code-ref ) and you can de-reference them (which runs the code);

Code-references are just scalars that refers to something, and you get them by using the reference-to operator:
read more...
permapage | score:9078 | -f00li5h, December 17, 2010

Online Ruby Interpreter

Up
vote
Down

Try Ruby online with this online tutorial / interpreter. It runs in your browser.
Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web. The beauty of Ruby is found in its balance between simplicity and power.

Try out Ruby code at the prompt above. In addition to Ruby's builtin methods, the following commands are available:
read more...
permapage | score:9073 | -Ray, November 30, 2005

Scripting: Put a clock in your bash terminal

Up
vote
Down

In the original version, the cursor positioning didn't work on my Mac OS X system. If that happens to you, try this simplified variant:
  #!/bin/bash
while true
do
tput sc
tput cup 0 60
echo -en `date +"%H:%M:%S %F"`
tput rc
sleep 1
done
Also, note that you'll need to run either script in the background to use your terminal.
The script saves the current cursor position with an ANSI escape sequence instruction. Then, using the tput command, the cursor is sent to row 0 (the top of the screen) and the last column minus 19 characters (19 is the length of HH:MM:SS YYYY-MM-DD). The formatted date command is displayed in green inverted color. The cursor is then sent back to its original position with another ANSI sequence that restores the original saved position.
read more...
mail this link | permapage | score:9073 | -Ray, January 22, 2008

C Source Code Example: Multithreaded RPC Server

Up
vote
Down

This can be considered an example, how to build multithreaded RPC Server for White Box Linux 3. Actually, approach described is universal , i.e. doesn't depend on particular code has been modified.

[Update June 26, 2005: Librenix is now featuring a C language multithreaded network socket programming game server project for Linux called Space Tyrant. As of June 26, there have been four code releases and the game is already playable from telnet.]

(here are some white canvas prints) read more...
mail this link | permapage | score:9054 | -Boris Derzhavets, May 14, 2005 (Updated: April 24, 2012)

Space Tyrant Index Page: Linux game server development project

Up
vote
Down

This page links to the various articles that have been published about Space Tyrant, a multithreaded, network socket programming Linux game server project in C.

[Update: 07Jun2014 You can play a development version of an upcoming MMORPG in text mode at telnet://textMMOde.com:2323
or, on a command line, enter:
telnet textmmode.com 2323
to log in and play. This game is based on Space Tyrant and the scenario is based on a modified Starship Traders.]

[Update: 03Jun2014 Starshiptraders, the parent of Space Tyrant, and the descendant of Czarwars, Lives Again]

Read below for the history and overview or just click these links for the articles:Space Tyrant is a C language Linux game server development project. It started out in February, 2005 as a humble echo server with high ambitions. On March 18, ST had its design and intentions announced to the world.
Today we kick off a new multithreaded, network socket programming project which we will call Space Tyrant. Our mission is to write an open source, multiplayer, networked, strategy game in the C programming language. The goal of this project is to make a solid code base which implements a simple space trading game upon which other games can then be built. The game will be a subset of The Last Resort (TLR) that currently runs at Ioresort.com. This project will be a learning exercise for me as well as for any interested readers. The current state of the source code will be released with each article update.
Source code to ST, then just an echo server, was not released.

Then, on March 27, 2005, ST was promoted to a crude chatserver.
This is the first code release of Space Tyrant. This is an early stage of development and, at this point, only implements the listening thread, the two IO threads for each player connection, and a skeletal game logic thread that does little beyond proof-of-concept code.
Next, on May 30, 2005, ST started to resemble some sort of incomplete text game.
It’s now possible to connect to the game via telnet and to create an account, log in, and be issued a ship. Once you’re logged in, there is a universe to explore filled with ports for buying and selling goods and planets for scooping free goods. From those trading activities you can earn money, called microbots. Other than trading to earn more money, you only use your microbots to buy fighters -- which you can use to attack other players or the neutral fighters that guard some sectors.
As of this release, the source code was placed under the GPL, version 2.

On June 26, 2005, Space Tyrant was released with many shiny new abilities. Players can now deploy fighters to guard sectors, navigate with the aid of an autopilot, rank the various players in the universe, and sleep peacefully knowing their alternate universe is being backed up constantly by a sporty new backup thread. Yes, good times are surely upon us.
If you’re looking for a planet, type the ‘L’ command that you would normally use to land on a planet in your sector. In the absence of a planet, the L key will engage the autopilot which will search for the nearest planet and give you a ‘/’ command to autowarp to it.
There is normally a copy of the development version of the server running on my decTOP on port 23. To access it, type (or click, if it works for you) the following command:

(telnet to my ST server)

The current development version of the code is usually at http://librenix.com/st/st.c but the individual articles link to the specific versions discussed in each article.

You can mail me about the project at spacetyrant [at] librenix.com -- or you can just telnet into Space Tyrant, as listed above, and send me a radio message. I'm likely to get that faster. ;)


The Space Tyrant project has a new website, SpaceTyrant.com, where the latest source code is always available. Also, new articles about ST programming and about ST gameplay will be posted there as they come available.


Information on The Last Resort follows. TLR is one of the two games that Space Tyrant is intended to replace someday. Space Tyrant has a long way to go before it replicates TLR's 25,000 lines of C code. So far, it has reused only about 40 lines of TLR code, a handy 'bit-plane' sort dating back to 1998.

  • TLR Survival Manual
  • Is this game for you? read more...
  • mail this link | permapage | score:8978 | -Ray, June 25, 2005 (Updated: June 7, 2014)

    Python for Kids

    Up
    vote
    Down

    A series of Python tutorials for children (or programming newbies) in a blog format. The article linked below implements a stand-alone Python program.
    In the last tutorial we created a file using our text editor and saved a function to it. This file was called trivia.py and in it was the module “trivia”. We then started Python in a console and import()ed the trivia module. Once imported, it created a “namespace” and we could access the askQuestion() function from within the trivia namespace by using a dot – trivia.askQuestion(). In order for the module to work properly we had to include an import statement within the module itself so that everything that the module relied upon was imported within the module. We then manually loaded our data from a pickle file we created and, manually, ran the askQuestion() function on the first question in our data store. Finally we added docstrings to the function and the module.

    In this tutorial we’re going to try to do much the same thing again, but without using the Python interpreter. That is, we will need to take the things we did in the interpreter and implement them in our trivia.py file. We will have a functioning (although still quite simple) stand alone Python program.
    read more...
    mail this link | permapage | score:8974 | -Ray, May 19, 2011
    More coding articles...
    Tallahassee Abstract Art

    coding headlines

    Quick and Dirty Vimdiff Tutorial

    Space Tyrant: A multiplayer network game for Linux

    Space Tyrant: A threaded game server project in C

    Install FB4Linux in Eclipse

    Vim Plugins: matchit.vim

    Pattern matching in shell scripting

    JSEclipse Tutorial: A JavaScript Eclipse Tool

    Tutorial: Linux Dialog Boxes

    Tutorial: Write a PHP wiki

    Tutorial: UDP socket based client server C programs

    Space Tyrant: A threaded C game project: First Code

    Why software sucks

    A multithreaded web server for Linux (source code)

    String matching in regular expressions

    Why Programmers are not Software Engineers

    Mono-culture and the .NETwork effect

    Sed One-Liners Explained

    Mac Shell Scripting Tutorial

    The Real Microsoft Monopoly

    Compile Crystal Space in Ubuntu 10.04

    Java J2EE Tutorial: Secret Santa Web Application

    Review: DevelopGo: A Linux Live CD for Programmers

    Import XML into OpenOffice Calc with XSLT

    Trace Linux apps with DTrace

    Java: Real numbers

    The life cycle of a programmer

    Free download: C/C++ Eclipse Plugin

    Install WebSphere MQ on Linux

    Tutorial: Install the Aptana AJAX IDE on Ubuntu

    Awk Tips, Tricks and Pitfalls

    Comparison: Zend PHP vs. Symfony vs. CakePHP

    I wrote my first programming e-book: Awk One-Liners Explained

    Linux Debugging Tools for C

    bind()... listen()... accept(): The Unix Socket FAQ

    Debugging Shell Scripts

    Create native looking Firefox web apps

    PowerPC assembly language

    Scripts for custom Linux distributions

    Introduction to Java programming

    Review: Multiplatform Visual SlickEdit 10.0

     

    Firefox sidebar

    Site map

    Site info

    News feed

    Features

    Login
    (to post)

    Search

     
    Articles are owned by their authors.   © 2000-2012 Ray Yeargin