Archive | September, 2002

Instant Slideshow with PHP – no GD required

Posted on 29 September 2002 by Demian Turner

Every once in a while a script comes along that scratches a big itch. PHP Slideshow by Kralingen Kees is such a script, and for anyone using a digital camera, you can now look forward to a hassle free way of sharing your pics online. To create a gallery you just upload your pics to a new directory, pop in the script and everything else takes care of itself – no GD library worries, just make sure your audience is running MS Explorer.

Comments (2)

Deleting Old Files: variations

Posted on 26 September 2002 by Demian Turner

Here is another way to delete old files, this time using a script. The script will delete files older than the most recent KEEP files.

Example: If you set KEEP = 12, the 12 most recent files will be kept and everything older deleted.

How to use:
1. Click \’read more\’ to view the script, copy and paste it into a file named \’deleteOldFiles.sh\’
2. make the file executable with \’chmod 755 deleteOldFiles.sh\’
3. change the constants KEEP, DIRLOC and FILEEXT to suit your needs
4. run the script by typing ./deleteOldFiles.sh

Comments (0)

Tags:

Unix: How to delete all files modified in the last x days

Posted on 26 September 2002 by Demian Turner

To do this at the command line for, say, 30 days, the following will do the trick:

find /path/to/dir -name "*.log" -mtime -30 -exec -rm {} \;
  • where /path/to/dir is just that, the path to the target directory
  • “*.log” will only delete files of a specified extension however you can apply any filter you like
  • the -exec switch is very handy when used in conjunction with ‘find’ – in fact you can feed the output of your search to any other command you like, same idea as pipe ‘|’
  • if this is your first time you may wish to try the less destructive -exec mv -f {} ./tmp \;
  • all statements of this type must terminate with ‘\;’ this closes the statement and escapes the final semi-colon

Comments (2)

The Art Of Software Development (part 4): Delivering Quality

Posted on 26 September 2002 by Demian Turner

from Devshed
Just writing code isn’t enough – you also need to test it thoroughly before you release it to a customer. This article discusses the testing phase of the software development cycle, providing you with an overview of test cases and testing processes, together with a discussion of how to go about documenting your software in a clear and concise user manual. Click here for full article

Comments (0)

Digital DJ – MySQL-based mp3-player frontend

Posted on 19 September 2002 by Demian Turner

Can your MP3 collection afford to be without this app? Currently only available for Linux – would make a nice Win32 PHP-GTK project, no?
DigitalDJ is an SQL-based mp3-player frontend designed to work with Grip. When Grip encodes mp3 files, it places all song information into an SQL database. DigitalDJ then uses this information to create playlists based on various criteria.

  • Manage a database of CDs in MP3 format
  • Interacts with Grip to add song information as you rip
  • Create playlists based on song properties such as Artist/Disc/Genre/Tempo
  • Play songs via an external MP3-player
  • Condensed mode with small screen footprint and scrolling display
  • Nifty BPM-O-Matic beats-per-minute calculator
  • Keeps track of number of plays and last play for song/disc/artist

Comments (0)

Personalise Your Shell Prompt

Posted on 19 September 2002 by Demian Turner

A few tips to help you improve your productivity at the command prompt:

  • creating shortcuts (aliases) to save you typing your favourite switch sequences
  • customising the info the appears at the prompt
  • different configurations for various shells

Click here for the full article.

Comments (0)

Linux Config Files: Get to Know your /etc Directory

Posted on 19 September 2002 by Demian Turner

From IBM DeveloperWorks
Introduction
Every Linux program is an executable file holding the list of opcodes the CPU executes to accomplish specific operations. For instance, the ls command is provided by the file /bin/ls, which holds the list of machine instructions needed to display the list of files in the current directory onto the screen. The behaviour of almost every program can be customized to your preferences or needs by modifying its configuration files.

Comments (0)

JPHP Lib. 0.5 beta

Posted on 17 September 2002 by Demian Turner

Hi dear PHP user,

I’m very happy to announce the opening of the JPHP project web site.
JPHP is a 100% Object Oriented Framework which takes its essence from the java standard and class structure.
So JPHP is dedicated to large projects where good object architecture design is needed.

JPHP provides PHP users a system to import their classes similar to the one found in java. You will finally be able to organize your classes in a package such as com.jphp…..
As it was designed from design pattern models, JPHP makes use of the interface/abstract model inviting you to extended it as often as you like for class reuse.

Core and general features are :

  • 100% object oriented library
  • Extensibility and Reusability
  • Import and class storing similar to java
  • Many useful base classes
    • String utils
    • CSV file manipulation and mapping
    • Data Layer Abstraction
    • Custom Session and Context management
    • Config file and multi-config file reader

Upcoming applications developed using JPHP :

  • JPHP 2.0a : optimisation performance and design of JPHP 0.5b rewritten from scratch
  • JPHP MVC Framework (use the project page) : help to create web sites using the MVC design pattern paradigm for better maintenance

stay tune at : http://www.jphplib.org

Comments (8)

Optimizing MySQL for Heavy Loads

Posted on 16 September 2002 by Demian Turner

Jeremy Zawodny, Yahoo!’s MySQL expert, reveals some interesting tips on MySQL optimization. Zawodny is in the interesting position of making sure things run smoothly for Yahoo’s PHP/MySQL setup.
A typical day:

  • up to 3,150 simultaneous connections on a single DB
  • 45 server webfarm feeding into one master DB server
  • 260 million record tables
  • Size of database: 25 GB

It’s good to see PHP/MySQL holding it’s own on the front lines 🙂

Comments (0)

The Art Of Software Development (part 3): Coding To A Plan

Posted on 13 September 2002 by Demian Turner

from Devshed
In its third part, this article will be focusing exclusively on the implementation phase of a software project, suggesting some general techniques and approaches that might come in handy when you finally sit down to write your application. The ideas discussed in the following pages are not new – heck, they’re not even exhaustive – but they should nevertheless help you deliver cleaner, faster and more maintainable code.

Comments (0)

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Facebook