Game in a Week

Found this news in Reddit where Jay Barnson has created a simple Role Playing Game(RPG) within a week(40 hours). He didn’t have any big budget or great tools. He used only freely available tools with basic APIs to create the game. His toolset is:

Code:

Art:

Sound:

  • Audacity plus a microphone or free sound samples.

This looks like a nice project to be done. I am downloading the game to try it out.
games, python, pygame

ODOC: lsdev

lsdev – Display information about installed hardware

Summary:

lsdev gathers information about your computer’s installed hardware from the interrupts, ioports and dma files in the /proc directory, thus giving you a quick overview of which hardware uses what I/O addresses and what IRQ and DMA channels.
This program only shows the kernel’s idea of what hardware is present, not what’s actually physically available.

Examples:

$ lsdev

Read: man lsdev
lsdev, odoc, linux, gnu/linux,kernel

ODOC: lspci

lspci — List all PCI device information.

Summary:

lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them.

Examples:

$ lspci — List all PCI device details in short form.

$ lspci -v — List all PCI device details in long form.

$ lspci -vv — List all PCI device details in very verbose form.

$ lspci -vb — Show PCI device connection in Tree form.

$ lspci -n — Show details in raw form like vendor & device code.

$ lscpi -d 8086: — Show only Intel’s PCI devices.

$ lspci -m — Show the details in more readable form.

$ lspci -x — Show initial PCI configuration details in HEX.

# lspci -xxx — Show whole PCI configuration details in HEX.

Read: man lspci
lspci, pci,linux, odoc, gnu/linux

ODOC: mii-tool

mii-tool — Show/Check/Set the MII status.

Summary:

MII (Media Independent Interface) is a standard bus which connects network interface controllers to physical media interfaces (PHYs). PHYs are usually located on a network interface card itself, but there are cards available which have external MII connectors for attaching external PHYs.

mii-tool display/checks/sets the status of a network interface’s MII unit. Most fast Ethernet adapters use an MII to autonegotiate link speed and duplex setting.

Examples:

# mii-tool — Show shot status info about the network card.

# mii-tool -v — Show detailed status.

# mii-tool -R — Reset the MII unit to default value.

# mii-tool -r — Restart the Auto Negotiation.

# mii-tool -w — Watch the network interface and show if there is any change in the status.(Run it and remove & reconnect the cable).

# mii-tool -F 10baseT-HD — Forcibly set the capability to 10Mpbs and Half Duplex mode.

# mii-tool -A 10baseT-HD, 10baseT-FD — Enable and restart Auto Negotiation, and advertise only the specified capabilities.

Read: man mii-tool
mii-tool,odoc, linux,gnu/linux,network

ODOC: unix2dos

unix2dos — UNIX to DOS text file format converter.

Summary:

Each OS will indicate the line end using Line Feed (LF,10) or Carriage Return (CR,13). Unix uses LF as line end, Windows/DOS uses CR/LF and MacOS uses CR.

So when transferring a file from Linux to DOS, you have to convert the Line end to DOS format. unix2dos will convert the Unix text file to DOS format.

Examples:

$ unix2dos gnu.txt — Convert and replace gnu.txt.

$ unix2dos -n gnu.txt dos.txt — Convert gnu.txt and write into dos.txt

$ unix2dos -k gnu.txt — Convert and replace gnu.txt, while keeping original date stamp.

Read: man unix2dos
unix2dos, dos, unix, mac, linux, odoc, gnu/linux

ODOC: dos2unix

dos2unix — DOS/MAC to UNIX text file format converter.

Summary:

Each OS will indicate the line end using Line Feed (LF,10) or Carriage Return (CR,13). So when transferring a file from DOS to Linux, you have to convert the Line end from DOS format to Linux format.
dos2unix will convert the DOS/MAC Text file to Unix format. Unix uses LF as line end, Windows/DOS uses CR/LF and MacOS uses CR.

Examples:

$ dos2unix dos.txt — Convert and replace dos.txt.

$ dos2unix -n dos.txt gnu.txt — Convert dos.txt and write into gnu.txt

$ dos2unix -k dos.txt — Convert and replace a.txt while keeping original date stamp.

Read: man dos2unix
dos2unix, linux, odoc, gnu/linux, mac, dos, unix

ODOC: rpm

rpm — RedHat Package Manager

Summary:

RPM is a Package Manager, which can be used to build, install, query, verify, update, & erase individual software packages.
A package consists of an archive of files and meta-data used to install & erase the archive files. The meta-data includes helper scripts, file attributes, & descriptive information about the package.
Packages come in two varieties: binary packages, used to encapsulate software to be installed, & source packages, containing the source code & recipe necessary to produce binary packages.

Examples:

$ rpm -qa — List all installed RPMs.

$ rpm -qf /usr/bin/gcc — Show which package installed this file.

$ rpm -qi -filesbypkg gcc-3.2.2-5 — Show the information and list of files from this package

$ rpm -qR gcc-3.2.2-5 — Show the dependency of this package.

$ rpm -q gcc –qf “%-30{NAME} %10{SIZE} %{DISTRIBUTION}n” — Show selected info tags of the package installed gcc.

$ rpm –querytags — Show all supported TAGs.

$ rpm -ivh new.rpm — Install the new RPM. (v – Verbose, h- Show Progress bar).

$ rpm -U latest.rpm — Update an Installed RPM.

$ rpm -F latest.rpm — Freshen (Update only if installed).

$ rpm -e Package-Name — Remove a package.

Read: man rpm
rpm, odoc, linux, gnu/linux

Python Speed and Performance Tips

This site in the Python Wiki is devoted to various tips and tricks that can be used to improve the performance of your Python programs. There are various tips right from sorting, string concatenation, looping, profiling, etc. Nice site to go for when you are refactoring the program.