Archive for the ‘Coding’ Category.

phpinfo from the command line

PHP.gif

Display information about your php install on the command line with the following:

echo “<?php phpinfo(); ?>” | php | less
simple enough.
Edit: apparently php -i does the same thing.  Leave it to me to find the hardway.

Installing Perl modules from CPAN

Perl.gif

There are several ways to get Perl modules from CPAN installed on your unix-based system. Keep in mind that there is always more than one way to do it with Perl, and this is no different. Before embarking upon any installation, it’s a good idea to download the module, unzip it and check out the documentation. In general, though, most modules are installed in the same method.

The simplest way to get Perl modules installed is to use the CPAN module itself. If you are the system administrator and want to install the module system-wide, you’ll need to switch to your root user.
Continue reading ‘Installing Perl modules from CPAN’ »

How to setup a FAMP (FreeBSD, Apache, MySQL & PHP) server

freebsd.png

Software installed and functioning by the end of this walk through :

  • FreeBSD 7.1
  • Apache 2.2
  • PHP 5.2.8
  • MySQL 6.0.9

First off grab a copy of FreeBSD 7.1 from http://www.freebsd.org/where.html

Once you have FreeBSD installed we can start.

Continue reading ‘How to setup a FAMP (FreeBSD, Apache, MySQL & PHP) server’ »

Ruby Cheatsheets

Perl Cheatsheet

Perl.gif

C Cheatsheets

Python cheat sheets

Python.png

Perl Regular Expressions Cheat Sheet

Perl.gif

Php Regular Expressions Cheat Sheet

PHP.gif

Perl Basics

Perl.gif

Perl is the Swiss Army chainsaw of scripting languages: powerful and adaptable. It was first developed by Larry Wall, a linguist working as a systems administrator for NASA in the late 1980s, as a way to make report processing easier. Since then, it has moved into a large number of roles: automating system administration, acting as glue between different computer systems; and, of course, being one of the most popular languages for CGI programming on the Web.

Why did Perl become so popular when the Web came along? Two reasons: First, most of what is being done on the Web happens with text, and is best done with a language that’s designed for text processing. More importantly, Perl was appreciably better than the alternatives at the time when people needed something to use. C is complex and can produce security problems (especially with untrusted data), Tcl can be awkward and Python didn’t really have a foothold.

It also didn’t hurt that Perl is a friendly language. It plays well with your personal programming style. The Perl slogan is “There’s more than one way to do it,” and that lends itself well to large and small problems alike.

Continue reading ‘Perl Basics’ »

Pages: 1 2 Next