21.11.08

Chmod, Umask, Stat, Fileperms, and File Permissions

I began researching permissions in detail. I went deep into the source code of Apache (which is why this site is called AskApache, BTW), PHP, Python, Ocaml, Perl, Ruby, and POSIX operating systems and got a pretty good handle on it now..

read more | digg story

18.11.08

ApacheCon US 2009

Call for Papers Opens for ApacheCon US 2009

The Apache Software Foundation (ASF) invites submissions to its official user and developer conference, taking place 2-6 November 2009 at the Oakland Convention Center and Marriott Hotel. ApacheCon serves as a forum for showcasing the ASF’s latest projects, members, and community initiatives. Offering unparalleled educational opportunities, ApacheCon’s presentations, hands-on trainings, and sessions address key technology, development, business/community, and licensing issues in Open Source.

The wide range of activities offered at ApacheCon promotes the exchange of ideas amongst ASF Members, committers, innovators, developers, vendors, and users interested in the future of Open Source technology. The conference program includes peer-reviewed sessions, trainings/workshops, and select invited keynote presentations and speakers.

Conference Themes and Topics

Building on ten years of success, ApacheCon returns to the Bay Area for the 10th anniversary of the Apache Software Foundation. Comprising some of the most active and recognized developers in the Open Source community, ApacheCon provides an influential platform for dialogue between Open Source developers and users, traversing a wide range of ideas, expertise, and personalities.

ApacheCon welcomes submissions across many fields, geographic locations, and areas of development. The breadth of the Apache community lends itself to conference content that is somewhat loosely-structured, with common themes of interest addressing groundbreaking technologies and emerging trends, best practices (from development to deployment), case studies and lessons learned (tips, tools, and tricks). In addition, ApacheCon will continue to offer its highly popular, two-day intensive trainings; certifications of completion will be distributed to those who fulfill all the training requirements.

Topics appropriate for submission are manifold, and may include but are not restricted to: Apache HTTP server (installation, configuration, migration, and more); ASF-wide projects (including Lucene, Hadoop, Jackrabbit, and Maven); Scripting languages and dynamic content (such as Java, Perl, Python, Ruby, XSL, and PHP); Security and e-commerce (performance tuning, load balancing and high availability); New technologies (including broader initiatives such as Web Services and Web 2.0); ASF-Incubated projects (such as Sling, UIMA, and Shindig); and Business/Community issues (Open-Source-driven business models, open development, enterprise-wide adoption, and more).

Submission Guidelines

Submissions must include:

  • Session title
  • Speaker name
  • Speaker biography
  • Session description
  • Format and duration
  • Audience expertise level

Full details are available online on the CFP page at http://us.apachecon.com/c/acus2009/cfp/

Types of Presentations:

  • Trainings/Workshops
  • General Sessions
  • Case Studies/Industry Profiles
  • Corporate Showcases & Demonstrations
  • Fast Feather (short) sessions
  • Birds of a Feather discussions
  • Invited Keynotes/Panels/Speakers

Pre-Conference Trainings/Workshops

Held on the first two days of the conference (2-3 November 2009), ApacheCon trainings are available at a registration fee beyond the regular conference fee. Proposals may be submitted for half-day (3 hours), full-day (6 hours), or two-day (12 hours) training sessions. These proposed tutorials should be aimed at providing in-depth, hands-on development experience or related continuing education. Training submissions are welcome at beginner, intermediate, and expert levels.

General Sessions include presentations on practical development applications, insight into high-interest projects, best practices and key advances, overcoming implementation challenges, and industry innovations. Especially welcome are submissions that extend participants’ understanding the role of ASF projects and their influence on the Open Source community at large. General Sessions are scheduled for 50 minutes and are accessible to all conference delegates.

Case Study/Industry Profile

Practitioners are invited to submit presentations that focus on how implementing particular ASF technologies led to improved products/solutions, service offerings, changes in work practices, among other successes. Proposals that highlight overcoming interesting challenges in application design and developing innovative frameworks using multiple ASF projects are particularly encouraged. NOTE: Marketing-oriented submissions aimed at promoting specific organizations or products will not be accepted.

Invited Keynotes/Panels/Speakers

Each conference the ApacheCon Planning team invites select presenters dealing with engaging, dialectical, and challenging subjects to present in keynote and/or panel formats. Topics include cutting-edge technology development, industry leadership, hot or emerging trends, opinions on controversial issues, insight on technology paradigms, and contrasting viewpoints in complementary professional areas. Those interested in suggesting a candidate for an invited speaker opportunity should submit a brief proposal with the speaker’s name, affiliation, background/bio, overview of topics of interest, and contact information.

Birds of a Feather (BoF) sessions and Fast Feather Track talks are selected by separate processes, nearer to the beginning of the conference.

Proposals are now being accepted at http://us.apachecon.com/c/acus2009/cfp/ and can be revised at anytime until the submissions closing deadline of 28 February 2009.

In addition, sponsorship opportunities for both ApacheCon EU 2009/Amsterdam and ApacheCon US 2009/Oakland are available. Please contact Delia Frees at delia@apachecon.com for further information.

ApacheCon US 2009 is co-produced by the Apache Software Foundation and Stone Circle Productions. The ApacheCon Planning team comprises ASF Members from all over the world working on a wholly-volunteer basis. For more information, visit http://us.apachecon.com/c/acus2009/

17.11.08

A Side Note On WordPress, SEO, sitemap.xml and robots.txt

A short and simple look at using a robots.txt file for SEO WordPress blogs.

read more | digg story

Tips and Tricks to increase site speed with .htaccess

One such file is .htaccess. This file can be used to improve your site’s loading time greatly, if mod_expires and mod_headers are compiled with Apache. Apart from this, there is one more simple method; gzip compression (using htaccess). Both are described in this article.

read more | digg story

AskApache SEO part 2: Move urls higher in Search Results

Part II of the Advanced SEO Series shows how to control which urls are indexed in Search Engines and moving higher up in Search Results

read more | digg story

3+ ways to speed up sites that use Google Analytics

Hosting ga.js locally, combining with other javascript files, setting the cookie's domain correctly, replacing the init javascript code.

read more | digg story

.htaccess trick shows Development CSS file only to Developer

I wanted to make changes to the .css file that only I could see, so that my regular traffic and site-visitors would still see the old version. Here’s the elegant solution I came up with using .htaccess and mod_rewrite

read more | digg story

Website Security for WordPress and Drupal

Short, sweet, and solid .htaccess security info.

read more | digg story

27.10.08

A WebServer built with 100 lines of BASH

Piotr Gabryjeluk: 100 lines of BASH script that simply rock!: "Screenshot Tour


#!/bin/bash

function debug {
local severity="$1"
shift
local message="$@"

echo -n "`date -u`" 1>&2
echo -ne '\t' 1>&2
echo -n "$severity" 1>&2
echo -ne '\t' 1>&2
echo "$message" 1>&2
}

function fix_path {
echo -n "$1" | head -n 1 | sed 's|^[/.-]*||' | sed 's|/\.*|/|g'
}

function serve_dir {
local dir="`fix_path "$1"`"
if [ "$dir" = "" ]; then
dir="./"
fi
echo 'HTTP/1.1 200 OK'
echo 'Content-type: text/html;charset=UTF-8'
echo
echo LISTING "$dir"
echo '
'
ls -p "$dir" | sed -e 's|^\(.*\)$|\1
|'
}

function serve_file {
echo 'HTTP/1.1 200 OK'
echo 'Content-type: application/x-download-this'
echo
local file="`fix_path "$1"`"
debug INFO serving file "$file"
cat "$file"
}

function process {
local url="`gawk '{print $2}' | head -n 1`"
case "$url" in
*/)
debug INFO Processing "$url" as dir
serve_dir "$url"
break
;;
*)
debug INFO Processing "$url" as file
serve_file "$url"
;;
esac
}

function serve {
local port="$1"
local sin="$2"
local sout="$3"

while debug INFO Running nc; do

nc -l -p "$port" < "$sin" > "$sout" &
pid="$!"

debug INFO Server PID: "$pid"

trap cleanup SIGINT
head -n 1 "$sout" | process > "$sin"
trap - SIGINT

debug INFO Killing nc

kill "$pid"
done

debug INFO Quiting server
}

function cleanup {
debug INFO Caught signal, quitting...
rm -Rf "$tmp_dir"
exit
}

tmp_dir="`mktemp -d -t http_server.XXXXXXXXXX`"
sin="$tmp_dir"/in
sout="$tmp_dir"/out
pid=0
port="$1"

mkfifo "$sin"
mkfifo "$sout"

debug INFO Starting server on port "$port"
serve "$port" "$sin" "$sout"
cleanup

20.10.08

.htaccess trick shows Development CSS file only to Developer

.htaccess trick shows Development CSS file only to Developer: ".htaccess trick to show Alternate CSS file based on IPThis past week I was making changes to my sites apache.css file for a site-redesign. I wanted to make changes to the .css file that only I could see, so that my regular traffic and site-visitors would still see the old version. I quickly came up with an elegant solution using the incredibly powerful .htaccess and mod_rewrite that worked so well I wanted to share it with all you great and interesting people :)"

11.10.08

Simple Wordpress Security Tips

Simple ways to protect your blog from malicious activity.

read more | digg story

Rare and Obscure Penetration Testing Tools

List of mainly obscure security software geared more for the master pentester. These are mostly for unix, bsd, and mac and many are difficult to install and setup (require custom servers, inside access points, obscure libraries). Only programs that output data are included, so no actual exploits or anything. Most of these output extremely useful al

read more | digg story

Simple Wordpress Security Tips

Simple ways to protect your blog from malicious activity.

read more | digg story

10.10.08

Wikipedia adopts Ubuntu for its server infrastructure

The Wikimedia Foundation, the organization behind the hugely successful Wikipedia project, is migrating all of its server infrastructure to the Ubuntu Linux distribution. This move reflects the growing viability of Ubuntu for enterprise-scale server deployments.

read more | digg story

How Much Do Top Bloggers & Social Media Consultants Get Paid

The media world is changing and its jobs are changing too. The rise of the blogger is an often-told story, but are the lucky few bloggers who do ...

read more | digg story

2.10.08

Eight Online Places to Learn something New!

If there is one thing I strongly believe is tapping the power of the Internet to learn. It is with always with great happiness that everything I have learnt in the past ten years (since I got online) has been only through tutorial sites.Here are a list of some of that where you can quickly and easily find tutorials, articles and information.

read more | digg story

30.9.08

Mod_Rewrite Variables Advanced Cheatsheet

List of All Variables used by RewriteCond and the actual variables Value for easier rewriting

read more | digg story

23.9.08

Huge Compilation of WordPress Code

If you are a theme designer, or just enjoy customizing your existing WordPress theme, it can sometimes be a hassle digging around for the WordPress code you need. I’ve spent a lot of time on this site collecting various snippets of code since launch and decided that it would probably be more convenient and useful to people if I was to consolidate..

read more | digg story

20.9.08

AskApache WordPress Hardening Plugin

Uses .htaccess and mod_rewrite security with the help of blogsecurity for a good solid setup.

read more | digg story

Optimize a Website for Speed, Security, and Easy Management

Discover how to setup and manage a website from top to bottom for optimized speed, security, and simplicity.

read more | digg story

19.9.08

Encrypted WordPress Site Backups

ecause backups contain all your sensitive information, its smart to encrypt any sql backups.. and while we’re at it, also encrypt any site backups.

read more | digg story

SetEnvIf and SetEnvIfNoCase Examples

Some nice SetEnvIf and SetEnvIfNoCase Examples for conditionally setting variables in Apache .htaccess

read more | digg story

18.9.08

CSS Message Box collection

A collection of some simple CSS styles you can apply to your message boxes (clean, solid, iconized, alternated rounded borders, tooltip).

read more | digg story

How to make sexy buttons with CSS

This tutorial will teach you how to create pretty looking textual buttons (with alternate pressed state) using CSS. Dynamic buttons save you heaps of time otherwise spent creating graphics and will basically make you a happier person at the end of the day.

read more | digg story

17.9.08

How to make sexy buttons with CSS

This tutorial will teach you how to create pretty looking textual buttons (with alternate pressed state) using CSS. Dynamic buttons save you heaps of time otherwise spent creating graphics and will basically make you a happier person at the end of the day.

read more | digg story

jQuery and JavaScript Coding: Examples and Best Practices

When used correctly, jQuery can help you make your website more interactive, interesting and exciting. This article will share some best practices and examples for using the popular Javascript framework.

read more | digg story

jQuery and JavaScript Coding: Examples and Best Practices | How-To | Smashing Magazine

jQuery and JavaScript Coding: Examples and Best Practices | How-To | Smashing Magazine: "Unobtrusive DOM Scripting

While the term “DOM scripting” really just refers to the use of scripts (in this case, Javascripts) to access the Document Object Model, it has widely become accepted as a way of describing what should really be called “unobtrusive DOM scripting”—basically, the art of adding Javascript to your page in such a way that if there were NO Javascript, the page would still work (or at least degrade gracefully). In the website world, our DOM scripting is done using Javascript."

Welcome to the World Wide Web Foundation

Dear Friends of the Web ...

Tonight, 14 September 2008, I joined Tim Berners-Lee in Washington, DC, USA at the incredible Newseum for his announcement of the formation of the new World Wide Web Foundation. Tim's speech is online, as well as video and photos and a press release.

Many thanks to everyone who has helped get us to this first step:

  • Alberto Ibargüen and the Knight Foundation for their very generous seed grant.
  • The World Wide Web Consortium (W3C) and Web Science Research Initiative, and the joint task force behind this project: Tim, Stéphane Boyera, Daniel Dardailler, Craig Heintzman, Rosemary Leith, Mauro Nunez and Thomas Roessler.
  • Ian Jacobs, Karl Dubost, Ted Guild and many others from the W3C systems and communications teams for building this Web site.

The promise of the Foundation is to accelerate the Web's advancement and growth around the planet. It is pretty exciting to be a part of it. We are still in the planning phase, and I expect to use this blog to share more information as we progress towards a full launch in early 2009. All those interested in becoming founding donors for this initiative are welcome to contact me at donations@webfoundation.org.

Beyond financial contributions, what about contributions of intellectual capital? It would be great to hear your ideas on how the community that is developing the Web used now by about 1/5th of the inhabitants of the planet could contribute their time and skills to bring the benefits of the Web to the other 4/5ths.

Have a look around the new site. If you have any questions or ideas, send me email at contact@webfoundation.org.

How to uninstall the Adobe Flash Player plug-in and ActiveX control

How to uninstall the Adobe Flash Player plug-in and ActiveX control

The World’s Easiest Way to Resize Flash Movies

Free actionscript, awesome online examples!

read more | digg story

Wordpress Security Tips and Hacks

10 simple tips to protect your WordPress blog from hacking.

read more | digg story

Prevent WordPress from getting hacked... twice

These are all really accurate tips, not just a thrown together list.

read more | digg story

14.9.08

Refresh vs. Ajax vs. More


A simple question at the bottom of each review asks the reader if they've found the review to be helpful. Those that feel inclined to respond can choose between two buttons, simply labeled Yes and No. While Amazon has sold millions of copies of this book since 2002, very few have shared their opinion of Ms. Tarrani's review. However, the few that did have provided a valuable service to future Harry Potter shoppers.

The interesting part of the helpful buttons is they don't refresh the page. Instead, upon pressing the button, a message appears, first informing the reader their feedback was being saved, then thanking them for their vote.

The Amazon team uses Ajax to complete this action. When the button is pressed, a message is sent to the Amazon server, who then confirms its receipt. Once the javascript function receives the confirmation, it displays the thank you note. All this happens in mere seconds, assuming the connection is solid. With practically no interruption, the user is now ready to go on to their next activity.

There are other ways Amazon could've implemented this same functionality. They could have, for example, stayed with the traditional button behavior, building the question into an HTML form tag. Pressing the button would do practically the same thing as the current Ajax behavior, except a new page would be returned.

From an implementation standpoint, the communication with the server is almost identical with this method. From the user's standpoint, however, it would be dramatically different. The user couldn't continue interacting with the page, until the new page was loaded. Returning the user to the same point in the page would be difficult, creating a jarring effect. (Anchor tags could get the browser to the same general neighborhood, but the page would likely shift from its original configuration.)

The designers at Amazon wanted to make the action subtle. Another option would've been to use radio buttons for each review. Clicking the radio button to indicate Yes or No wouldn't invoke a page refresh. However, to register the vote, users would have to remember to press a submit button. It's likely that users might forget to do this, thereby neglecting to get their votes registered, and defeating the purpose of the function.

For Amazon, Ajax is the right way to implement this functionality. However, deciding when to use Ajax to eliminate a page refresh is not always easy.

At Netflix, Ajax Pushes to the Top (Sometimes)

The designers for Netflix.com are big fans of using Ajax to eliminate page refreshes, having been a pioneer with the technique from the early days. (They were one of the first, using it to register how many stars their subscribers rated each movie.)

Interestingly, they don't use it for everything. One place where this jumps out is in the movie queue. Subscribers add DVDs they'd like to watch to the queue and use it to manage the order they'll receive the discs.

The queue functionality offers three ways to change the order of the list. In the early versions, subscribers entered a number into a type-in field next to the movie and pressed an update button. Putting a '2' in the third movie would move it to the second position on the list.

Because the most common subscriber action was to choose the next movie to watch, the team added a "TOP" button to move the disc to the top of the list. In the most recent version, users can also drag the movie into the new position.

It's interesting that the original number-and-button operation still results in a page refresh, while the new operations don't. Similarly, on the same page, rating a movie doesn't have a refresh, while deleting a movie from the list does.

This isn't by accident -- the designers have made these choices deliberately.

Comparing Orbitz and Kayak: Sorting Flights

Here's an experiment you can try at home: Open up two browser windows (or tabs). In one, bring up the travel reservation site, Orbitz.com, and in the other, bring up it's competitor, Kayak.com. Ask for the same reservation in each, say a 4-day trip from Boston (BOS) to Las Vegas (LAS) sometime in November. (Putting it a couple of months out will give you the most flight options.)

Both sites lets subscribers sort the resulting flight options by several criteria, such as price, departure time, and duration. This is what we'll compare. Measure how long it takes to re-order the list when you switch to a different criteria.

When I do it, it takes Orbitz 6 to 7 seconds, on average, to make the switch, while Kayak is usually less than 2. Orbitz involves a page refresh, while Kayak reorganizes the data without the refresh. (Interestingly, Orbitz only loaded the page with data for 45 flights, whereas Kayak loaded the data for all 532 flights in my trip. The initial load for Kayak is a little longer, moving all that data, but not substantially so.)

How Much Does 2 Seconds Matter?

When we've watched users booking reservations, we've noticed users are far more likely to explore the sorting options on Kayak than on Orbitz. We think Orbitz's design limits the interaction experience for users because of the page refresh.

Can the refresh be too fast? Absolutely. Kayak, interestingly, has to put up a big interstitial box that says "Sorting Results..." to ensure users notice. In earlier designs, when they didn't display the box, users would often miss the re-ordering, thinking that nothing happened.

When to Eliminate the Refresh

If the result of the action will bring the user back to the same page, then it's a good time to investigate eliminating the refresh. For example, instead of re-displaying the same account creation page after the user entered a password that isn't good enough, using a javascript function to give feedback on the password immediately after entry can make for a nicer experience.

In most browsers, a refresh freezes the current page, waits for the new data, erases the old page, redraws the new page from the top, and, if specified, jumps to the anchor. The freezing and flashing result can be a jarring experience for the user. When the user is expecting a different page, they don't seem to pay much attention to it. So, for most clicks, a new page will be what people expect.

However, as in the case of Amazon, Netflix, and Kayak, sometimes you want to go for a more subtle effect. Instead of the flash and bounce from a refresh, a simple changing of the data works better, encouraging the user to interact even more.

There are downsides, of course. Javascript and Ajax isn't easy for everyone to work with. It has browser incompatibilities, so you have to be up-to-date on the latest hacks. Memory management in Javascript can get messy, causing performance problems as more data is loaded into the browser. (Google's new Chrome browser is optimized to deal with this, since Google loves to use Ajax in its applications.)



Read Full Story

13.9.08

.htaccess Tutorials

.htaccess Tutorials: ".htaccess tutorial

.htaccess file provide a way to make config changes on a per-directory.

* Archives .htaccess
* authentication and/or authorization in .htaccess
* Example of SSI
* CGI sample code
* What they are/How to use them
* Not using .htaccess files
* As the directives are applied
* Solving Problems"

JavaScript Obfuscator

JavaScript Obfuscator: "The features summary of JavaScript Obfuscator
Click on the small arrow below each item to expand details.
Unique! It can compress names of local variables (like YUI Compressor does) while obfuscating (or keeping the same) names of all other symbols; names of local variables can also be mangled after compressing them to get more cryptic code
show details
JavaScript Obfuscator has special modes that assign local variable names a shortest name possible (considering the scope of variable) like YUI Compressor does. In fact, a modified and optimized version of YUI compressor is used for such modes - thus it's very reliable and well-tested.

After local variables are assigned shortest names possible, these name assignments can be kept (while mangling all other symbols using other mangler - e.g. md5) resulting in very short output. Alternatively, the assigned names can be also mangled after that, like all other symbols - this resulting in different resulant name being assigned to variable of the same name in different scopes.

An interesting special case is when mangler 'none' (that does not alter symbol names) is used for all other symbols - all public API of your scripts is preserved (so you don't have to compose lists of exceptions and test your code extensively), while name of local variables get shortest meaningless names. The output will have much smaller size compared to size of input"

I recommend using an obfuscator like this one after using Dojo to compress it.

12.9.08

Free Software, Power to The People - Book

Salon: fsp outline:

Complete book outline

Warning to readers: This outline is subject to change at any time. In fact, the outline you are currently reading is not the original outline posted at the launch of the Free Software Project. After the first month, I became frustrated with the delays inherent in waiting until I had complete, 10 to 15,000 word-long chapters before posting them. So I have now broken down the original chapter divisions into shorter chunks. I'm hoping that this will accelerate the process of writing and uploading each section.

Ideally, this will also increase flexibility. The story of free software is ongoing, and as events warrant I would like to incorporate coverage of them into the main narrative. So if for example, a Linux company goes bankrupt, it might then be appropriate to cover that in the context of a section on the perils of going public as a free software enterprise. Or, as is the case with the current (April 20th, 2000) installment, if circumstances allow me to travel to Finland I can then write about the experience, even though Finland wasn't originally scheduled to be covered until Chapter 6, as part of the introduction to Linux and Linus Torvalds.

It is most unlikely that this will be the last change in plans. The order of the chapters may be changed, new chapters may be added, sections may be moved from one chapter to another. I'm also always interested in suggestions as to what should be covered that isn't mentioned here. I consider this outline a plan of action, but I doubt that it will map perfectly to the final product.

If you're curious you can still look at the old outline.
--Andrew Leonard

Chapter 1: Boot time

This introductory chapter examines some of the potential starting points for the story of free software, ranging as far back as the 11th century and as recently as the summer of 1999. The main goal of this chapter is to give readers a sense of just how broad and far-reaching the implications of free software are. The global economy, free speech and censorship, intellectual property, the rise and fall of monopoly power, the history of the Net -- these are just some of the issues that will be explored in future chapters. This chapter is meant to be comprehensible to people who aren't experts in software or computer technology; later chapters will delve deeper. (This section of the outline is unchanged from the original version).

Chapter 2: Free speech and free software

Part I:

What do free speech and free software have in common? Much has been made by computer historians of the intersection between the counterculture of the Bay Area and the early history of the personal computer. One story that hasn't been told very often is the role the computer science department at Berkeley played in the growth of the Internet, the spread of Unix and the eventual blossoming of free software.

Not everyone at UC Berkeley was a Free Speech Movement veteran or anti-Vietnam War protester, of course. Prodigal programmer Bill Joy didn't pay too much attention to politics in the mid-'70s -- he was too busy rewriting AT&T Unix from top to bottom, and redistributing his changes as the Berkeley Software Distribution, or BSD. BSD became very popular with academics and Internet geeks all over the world, and once Joy's team added networking capabilities to it, BSD evolved into the lingua franca of the Internet.

I will argue that the contribution Berkeley made to networking, Unix and the Net can be seen as just as important as the contribution Berkeley made to radical politics in the 1970s. And indeed, for some of the Berkeley researchers, getting the Net to the people was the biggest contribution to the idea of free speech that they could make.

Part II:

Bill Joy and the other BSD hackers were working in the context of Unix. Linux, too, is in the Unix family tree. Is there something different about Unix that encourages cooperation? Or is there something different about Unix that attracts idiosyncratic independent minded cusses? I'd answer both questions in affirmative. In a technical sense, Unix is all about networking, that's why it has flourished on the Net and has helped the Net flourish. But there's also a culture to Unix that sets it and its related languages and programs apart. Unix is different from Windows in profound cultural ways, just as the MacOS is different from Windows, in quite different, but equally profound ways.

What does it mean to say that Unix has a culture. Part II of Chapter 1 will be The Free Software Project's first stab at exploring the culture inherent in various strains of code. Perl, for example, attracts a certain type of hacker -- I'd like to know why and how? How much credit can we give to Unix's original creators? And how does Unix differ from the culture of Linux?

Chapter 3: The saint of free software: Richard Stallman goes it alone.

More than any other single person, Richard Stallman is responsible for incubating both the idea and the reality of free software. He has been profiled countless times, including once by myself, so I'd like to approach the chapter on him from two directions.

Part I: Richard Stallman -- virus or prophet?

Even as the Internet was gaining momentum and the Berkeley researchers were pumping out new versions of Unix, back on the East Coast the "hacker ethic" was under concerted assault. Although MIT is widely credited as the birthplace of hacker culture, by the early 1980s it was beginning to look more like a graveyard. No one felt the chill more than Richard Stallman, who watched in dismay as one colleague after another left the ivory tower to work in the private sector. No longer was he allowed to share the benefits of their work; no longer was software considered the property of all. Now, everything was proprietary.

Today, the Free Software Foundation that Stallman founded in 1984 is credited as the single most important force in resisting the advance of proprietary-only software. During hacking's darkest hour, Stallman kept the light of free software freedom aflame, persevering bullheadedly against all odds in his project to write free software that everyone could use. Without the tools that he created, the development of Linux and countless other free software programs would have been extraordinarily difficult.

Stallman has an opinion on everything, and the current high profile of free software has given him a bigger pulpit from which to declaim from than ever before. Patents, the Microsoft trial, free manuals, copyright, in this section I'll give a comprehensive a look at both the person and the ideas. But I'll do it from a specific angle -- is Richard Stallman a human virus. His GPL license has been criticized as an anti-capitalist virus. What about the person himself. What kind of effect is he having?

Part II: Becoming the virus

Both parts of Chapter 3 will be written using only free software. This will require some learning on my part, and probably won't be as comfortable for me as if I used a proprietary editor. But for Stallman, comfort isn't the issue. Morality is. Some people just feel better using free software. The psychology of the users of free software is as important as the technical construction of that software.

Why do programmers love free software? Why does Linux command such ferocious fandom? The reasons go beyond just the rewards of creating or working with efficient, bug-free software and don't necessarily dovetail with political or moral motivations.

Writer Ellen Ullman calls it the "close to the machine" factor. With free software, you can get your hands dirty, you can fix problems as they arise, and you have the sense that your computer's innards are accessible to you. While this isn't always attractive to everyone -- most average computer users don't really want to muck around with a computer's insides -- it does have a potent appeal to some people who don't consider themselves programmers.

With free software, everyone can become a programmer -- or at the very least a member of a greater programming community. As one learns how to configure a free software program on one's own computer, one naturally turns to the community for help and hints, and in the process of learning, becomes a member of that community who can help others.

There is a psychological attraction to free software. There is a poetry to code, an exhilaration that comes from successful programming, no matter how trivial. Free software programming allows the purest kind of programming satisfaction -- to an almost spiritual degree. This chapter will examine the psychological motivations fueling free software excitement, and will also give the author a chance to detail his own personal journey into the world of free software. Part II will be a plunge into that psychology from a user's perspective.

Chapter 4: The Internet and Free Software

Part I: Duct tape for the Net: A Perl beyond price

The Internet's growth from a government project that linked university research centers together into one of the most important organisms of society at the close of the 20th century has been told many times. What hasn't been previously recounted, however, is the role that free software hackers played in the Internet's evolution. Chapter IV will show how the Internet and the free software movement are linked together in a positively reinforcing feedback loop: The hackers improve the Net, and the Net enhances the quality of hacker productivity.

One entry point for telling this part of the story is Larry Wall, the creator of the programming language Perl. There would be no Yahoo without Larry Wall -- and no Amazon either, not to mention a million other Web sites. Perl is to the World Wide Web as mortar is to a building made out of bricks. It is the glue language, the thing that stitches everything together. It has made possible a whole new generation of Web-based businesses.

That alone would be enough reason to pay attention to Wall. But that was hardly his first major achievement. In the early 80s, Wall also wrote a little program called "patch." It didn't do much, and wasn't very complicated. Its main purpose was to allow programmers to upgrade their versions of much larger programs without having to get a whole brand new copy of the program delivered over the Net -- an ordeal that could cost time and money back in the old, low-bandwidth days of the Net. Patch turned out to have huge consequences for the Internet. With patch, programmers could make their own changes to programs and distribute them quickly and efficiently across the Net. Patch made possible the style of collaborative software development that later resulted in the success stories of Linux, Apache, Perl and the rest of the free software pantheon.

Part II: The Web and Free Software

The second section of Chapter 4 will focus on how free software tools have made the new era of Web-based businesses possible. But it will also begin to take a more critical look at some aspects of free software culture. For example, there's the problem of the "benevolent dictatorship" model that most free software projects operate under. Despite the "organized anarchy" that prevails in Net-based free software projects, the most successful usually have one central charismatic leader who makes ultimate decisions. The "community" must support those decisions for them to be effective, but without a strong leader, free software projects often founder. What does this say about the scalability of free software business models -- or their long-term stability?

Chapter 5: Guns, free software and libertarians

Part I: Eric Raymond

Chronologically, chapter 5 takes the story of free software from Stallman's lonely isolation to the mass movement that is dominating press headlines in the late '90s. Eric Raymond, the self-described "technopagan libertarian" and leading spokesman for free software, is the central focus of the chapter. Raymond, the author of several books and numerous influential articles, is also the premier anthropologist and folk historian of hacker culture. Chapter 5 will continue the exploration of the hacker psyche, with particular emphasis on the libertarian component.

Part II: The politics of software

A consideration of libertarianism is essential to the discussion of free software. Libertarian culture has always thrived on the Net, and the economic model of free software -- which emphasizes grassroots independence -- is psychologically attractive to libertarians. But the "free software movement" is often accused of being a thinly disguised left-wing attack on business. And indeed, a significant number of the software developers who work on free software projects live outside of the United States and are motivated by suspicion and distrust of American-style capitalism.

Chapter 6: The rise of the penguin: Linux and the plot for world domination

Part I: The Lore-masters of Finland.

The story of Linux starts in Finland, where an undergraduate at the University of Helsinki first started fooling around with ideas for his own operating system. I will be visiting Finland at the end of March, so this chapter will start there as well. Finland is enormously technologically advanced for a country its size, and Finnish programmers have played a role in the Internet's development that long predates the rise of Linux. Part II: Linus Torvalds and the creation of Linux.

How did it happen? Who is Linus Torvalds? What does he think? How is he different from the other free software hackers. The second section will trace the rise of Linux to its current incarnation as one of the most exciting stories in the computing world today. How did this happen? Linux is the biggest story in free software, the linchpin of the entire movement. In chronological terms, Linux completes the journey that began at Bell Labs.

Chapter 7: The rise, (and fall?) of the New Linux Economy

Part I: IPO madness!

1999 was the year the stock market went crazy of Linux.

Part II: IPO despair!

2000 was the year the stock market suddenly hated Linux.

These two sections, together, will try to untangle the stormy ups and downs of the market's infatuation and then, subsequently, disgust for Linux. What can we learn about how the stock market, Silicon Valley, Wall Street and the technology industry are feeding off each other from the experience of Linux? Is it even possible that Linux can be commercialized. What are the venture capitalists thinking?

Even long-time advocates of free software were stunned by the events of 1999. Suddenly, as viewed by the investment community, venture capitalists and day-traders, Linux achieved the same buzzword status as earlier concepts like "push" and portals. Companies like Red Hat and VA Linux had huge initial public offerings, giving them stock valuations high enough to purchase other companies, hire scores of programmers, and begin to subsidize the creation of even more free software on a hitherto unprecedented scale.

Is this just another example of dot-com hype gone mad? Is Wall Street being hornswoggled? Or is something deeper happening -- is the free market recognizing the lasting value of free software? Chapter 11 will examine the intersection of the so-called New Economy with the economy of free software, and explore the problems that may arise when the desires of shareholders in publicly traded companies clash with the fiercely held community values of free software hackers.

Chapter 8: Death to Microsoft

Part I: Microsoft vs. The Gift Economy

The central conflict in the free software saga can be summed up as a showdown between the status quo of Silicon Valley-style capitalism and the new information economy of the Net.

Free software developers operate in a kind of "gift economy." This, of course, is not how Microsoft -- or most other software or computer hardware producing corporations -- plays the game. Instead, it seeks to guard its intellectual property, or, if a competitor appears on the scene, purchase it. Patent applications, non-disclosure agreements, license agreements: the structure of techno-capitalism is built on the control of information.

The success of the free software movement offers hope that there may be new strategies possible for propelling a productive economy -- strategies that don't depend on enforcing artificial limitations on how people are allowed to cooperate or share information. It's possible that this new model may only work in the realm of software, but there may also be applications in other arenas of social endeavor -- one of the sub-themes of this book will be to look for those other arenas.

Will free software topple Microsoft? What does Bill Gates really think about Linux? How will Microsoft attempt to co-opt the movement? Gates has successfully reengineered Microsoft at least once, turning the company around on a dime to "embrace and extend" the Internet. Can he do the same with free software?

A consideration of Microsoft will lead to the wider question of what free software will mean for the entire software industry. In a growing number of cases, free software programs are qualitatively better than their proprietary commercial alternatives -- faster and smarter as well as, obviously, cheaper. Linux has a surging reputation for stability and reliability that many advocates swear puts Microsoft to shame. Apache, a Web server program that operates Web sites, is by far the most popular product of its kind. Through the release of their source code to the general public, free software programs benefit from unparalleled "peer review" -- from having thousands upon thousands of programmers hammer on the code, fix bugs and test it under every possible condition. Software today is becoming unthinkably huge and complex -- Windows NT, Microsoft's industrial-strength operating system, is reputed to consist of a whopping 35 million lines of code. In this era, the distributed resources of the entire Internet constitute the only environment large enough to adequately test all the possible mishaps that might befall so complex a computer program.

Part II: Free software, monopolies, and government action.

The pragmatic benefits offered by free software constitute the biggest threat to Microsoft. How will Bill Gates and co. adapt?

Finally, this chapter will also attempt to place free software in the context of government-business interaction. Since one of the starting points of free software was government restrictions placed on AT&T, and one of the current focal points of free software is Microsoft, it will be useful, in this politically-minded chapter, to consider how monopoly power and government interaction can intersect with and affect the world of software.

(N.B.: As of April, the last three chapters do not yet lend themselves to modularization. But that could well change!)

Chapter 9: Free to be, you and me

MP3. DVD. Copyrights, patents, and software piracy: No issue in the current world of software is more divisive, more hotly contested, and more unsettled than the question of ownership of code -- not just in terms of software, but in terms of entertainment and media. It's not an accident that some of the most vocal fans of free software are also busy trading MP3s or reverse engineering encryption protections for DVD players. Music and moves are software, today, and the Internet is, at the very least, the most effective distribution vehicle for such software ever invented.

Push is coming to shove here, and no one knows how the story will play out. Will the defenders of intellectual property be able to hold off the barbarians of the Net? Or will new technological realities force accommodation? Even as corporations race to patent anything and everything they can, and pour hundreds of millions of dollars into defending copyright and attacking software "piracy," the Net is forcing new business models and new ways of thinking on the entire world.

Chapter 10: Free software bootstrapping the world

One can argue that every dollar Microsoft spends attacking software piracy in the third world is a dollar of advertising for Linux and free software. Already, countries like India and China are taking a close look at Linux; it's cheap, it's not tied exclusively to an American corporation and it can be adapted to fit every local need. Free software is a great bootstrapping tool for countries short on resources.

One of the most intriguing points about this is that free software is in large part the product of the most privileged classes of the First World. Programmers, by and large, are paid so well that they can afford to take on hobbies like free software projects in their spare time. And in doing so, they are creating an infrastructure of tools that the whole world can and will benefit from.

Epilogue: The greatest gift

Even if Microsoft isn't toppled by free software, even if Linux doesn't displace Windows 2000 and even if the fundamental dynamics of the information market economy are not completely transformed by the free software movement, the possibility that we have been offered a different path to take is valuable in its own right. The Internet encourages people to work together, if not for profit, then for fun. In the new gift economy, that might be the greatest gift of all.



Copyright © 2000 Salon.com All rights reserved.

11.9.08

45+ CSS Web Design Blogs

45+ Blogs related to CSS Web Design

read more | digg story

WordPress .htaccess anti-hacking, anti-spam Plugin

Added file revisioning support to .htaccess files, so that every time you update or change the .htaccess files it saves the old copy. The next release will provide a DIFF view of the differences.

read more | digg story

21.8.08

CSS Decorative Gallery

Decorate your images and photo galleries without editing the source images.

read more | digg story

Custom 404 pages - Webmaster Help Center

Custom 404 pages - Webmaster Help Center: "

Custom 404 pages

A 404 page is what a user sees when they try to reach a non-existent page on your site (because they've clicked on a broken link, the page has been deleted, or they've mistyped a URL). A 404 page is called that because in response to a request for a missing page, webservers send back a HTTP status code of 404 to indicate that a page is not found. While the standard 404 page can vary depending on your ISP, it usually doesn't provide the user with any useful information, and most users may just surf away from your site.

If you have access to your server, we recommend that you create a custom 404 page. A good custom 404 page will help people find the information they're looking for, as well as providing other helpful content and encouraging them to explore your site further.

(Note: This article covers guidelines for creating the content of your custom 404 page. For information on configuring your server to display your new 404 page, check your server or web hoster documentation. You should still make sure that your webserver returns a 404 status code to users and spiders, so that search engines don't accidentally index your custom 404 page.)

Because a 404 page can also be a standard HTML page, you can customize it any way you want. Here are some suggestions for creating an effective 404 page that can help keep visitors on your site and help them find the information they're looking for:

  • Tell visitors clearly that the page they're looking for can't be found. Use language that is friendly and inviting.
  • Make sure your 404 page uses the same look and feel (including navigation) as the rest of your site.
  • Consider adding links to your most popular articles or posts, as well as a link to your site's home page.
  • Think about providing a way for users to report a broken link.
  • No matter how beautiful and useful your custom 404 page, you probably don't want it to appear in Google search results. In order to prevent 404 pages from being indexed by Google and other search engines, make sure that your webserver returns an actual 404 HTTP status code when a missing page is requested.
"

20.8.08

.htaccess Plugin Blocks Spam, Hackers, and Password Protects

WordPress Plugin blocks spam, hackers, exploits, and password protects your blog using .htaccess

read more | digg story

Crazy Advanced Mod_Rewrite Tutorial

Super Advanced Mod_Rewrite Tutorial for .htaccess filesDecoding Mod_Rewrite VariablesSo when I realized my problem was that I didn’t know the value of the variable being tested by the RewriteCond, I set out to try and discover how to view those variables.. Keep in mind you can also use RewriteLogging, but its only allowed for root users who can edit the httpd.conf, this is .htaccess.Setting Environment Variables with RewriteRuleI discovered a multitude of methods to set and view apache environment variables, using various modules and some core tricks, but the method that allows me to view the most environment variables is RewriteRule.. I wanted to use SetEnvIf more, but its just not as powerful as mod_rewrite, due to programming.This code sets the variable INFO_REQUEST_URI to have the value of REQUEST_URI.

read more | digg story

19.8.08

18.8.08

WP Plugin: all-in-one htaccess plugin

With .htaccess you can do so many things, but the risky part is almost all the time you need to edit your .htaccess file manually. However, now there is a special htaccess wp plugin for wordpress blogs that does so many things (full features are below the screenshot). All you need is “enable” a particular feature and it will rewrite your .htaccess

read more | digg story

AdesBlog.com » WP Plugin: all-in-one htaccess plugin

AdesBlog.com » WP Plugin: all-in-one htaccess plugin: "

With .htaccess you can do so many things, but the risky part is almost all the time you need to edit your .htaccess file manually. However, now there is a special htaccess wp plugin for wordpress blogs that does so many things (full features are below the screenshot). All you need is “enable” a particular feature and it will rewrite your .htaccess file automatically.

wp_htaccess.png

Full Features

  • Directory Protection
    Enable the DirectoryIndex Protection, preventing directory index listings and defaulting.
  • Password Protect wp-login.php
    Requires a valid user/pass to access the login page
  • Password Protect wp-admin
    Requires a valid user/pass to access any non-static (css, js, images) file in this directory.
  • Protect wp-content
    Denies any Direct request for files ending in .php with a 403 Forbidden.
  • Protect wp-includes
    Denies any Direct request for files ending in .php with a 403 Forbidden.
  • Common Exploits
    Block common exploit requests with 403 Forbidden.
  • Stop Hotlinking
    Denies any request for static files (images, css, etc) if referrer is not local site or empty.
  • Safe Request Methods
    Denies any request not using GET,PROPFIND,POST,OPTIONS,PUT,HEAD
  • Forbid Proxies
    Denies any POST Request using a Proxy Server. Can still access site, but not comment. See Perishable Press
  • Real wp-comments-post.php
    Denies any POST attempt made to a non-existing wp-comments-post.php
  • HTTP PROTOCOL
    Denies any badly formed HTTP PROTOCOL in the request, 0.9, 1.0, and 1.1 only
  • SPECIFY CHARACTERS
    Denies any request for a url containing characters other than “a-zA-Z0-9.+/-?=&” - REALLY helps but may break your site depending on your links.
  • BAD Content Length
    Denies any POST request that doesnt have a Content-Length Header
  • BAD Content Type
    Denies any POST request with a content type other than application/x-www-form-urlencoded|multipart/form-data
  • Directory Traversal
    Denies Requests containing ../ or ./. which is a directory traversal exploit attempt
  • PHPSESSID Cookie
    Only blocks when a PHPSESSID cookie is sent by the user and it contains characters other than 0-9a-z - *** Safe, Use
  • NO HOST:
    Denies requests that dont contain a HTTP HOST Header.
  • Bogus Graphics Exploit
    Denies obvious exploit using bogus graphics
  • No UserAgent, No Post
    Denies POST requests by blank user-agents. May prevent a small number of visitors from POSTING.
  • No Referer, No Comment
    Denies any comment attempt with a blank HTTP_REFERER field, highly indicative of spam.
  • Trackback Spam
    Denies obvious trackback spam. See Holy Shmoly!
  • SSL-Only Site
    Redirects all non-SSL (https) requests to your https-enabled url
  • Anti-Spam, Anti-Exploits
    Denies Obvious Spam and uses advanced mod_security protection

Go get it tiger! ;)

Plugin page: www.askapache.com/wordpress/htaccess-password-protect.html

Max Design - standards based web design, development and training » Some links for light reading (12/8/08)

Max Design - standards based web design, development and training » Some links for light reading (12/8/08): "Some links for light reading (12/8/08)

Some links for light reading (12/8/08)

August 12th, 2008

In Praise of Minify

The first optimization was very easy. I made sure my images were sufficiently cached by adding a quick .htaccess file in the directory where my images are stored on the server. I saw 2 different techniques for doing this. One was based on file extension, such as the technique discussed here if I have a file that’s incorrectly named it will still.

read more | digg story

11.8.08

AskApache is pushing mod_rewrite boundaries to the limits

Using Apache’s mod_rewrite allows us to perform basic filtering and application firewalling. AskApache is pushing mod_rewrite boundaries to the limits with a cool plugin that will allow automated anti-hack/spam htaccess rules.

read more | digg story

9.8.08

Elite Log File Scrolling with Color Syntax

Scrolls the latest log entries for multiple log files to the current screen or to any other monitor or TTY in color using syntax highlighting, making debugging easier and saving a lot of time for multi-monitor workstations.

read more | digg story

18.7.08

Implementing Conditional 304 Gets for RSS and Magpie

HTTP Conditional Get for RSS Hackers

Given the massive confusion exhibited here, I've written a nice, simple guide on how to implement HTTP's Conditional GET mechanism, with regards to producers and consumers of RSS feeds.

This article presumes you are familiar with the mechanics of an HTTP query, and understand the layout of request, response, header and body.

What is a conditional get?

My full-length RSS feed is about 24,000 bytes long. It probably gets updated on average twice a day, but given the current tools, people still download the whole thing every hour to see if it's changed yet. This is obviously a waste of bandwidth. What they really should do, is first ask whether it's changed or not, and only download it if it has.

The people who invented HTTP came up with something even better. HTTP allows you to say to a server in a single query: “If this document has changed since I last looked at it, give me the new version. If it hasn't just tell me it hasn't changed and give me nothing.” This mechanism is called “Conditional GET”, and it would reduce 90% of those significant 24,000 byte queries into really trivial 200 byte queries.

Client implementation

The mechanism for performing a conditional get has changed slightly between HTTP versions 1.0 and 1.1. Like many things that changed between 1.0 and 1.1, you really have to do both to make sure you're satisfying everybody.

When you receive the RSS file from the webserver, check the response header for two fields: Last-Modified and ETag. You don't have to care what is in these headers, you just have to store them somewhere with the RSS file.

Next time you request the RSS file, include two headers in your request.. Your If-Modified-Since header should contain the value you snagged from the Last-Modified header earlier. The If-None-Match header should contain the value you snagged from the ETag header.

If the RSS file has changed since you last requested it, the server will send you back the new RSS file in the perfectly normal way. However, if the RSS file has not changed, the server will respond with a ‘304’ response code (instead of the usual 200), where 304 means ‘Not Modified’. In the case of a 304, the response will have an empty body and the RSS file won't be sent back to you at all.

There's a temptation for clients to put their own date in the If-Modified-Since header, instead of just copying the one the server sent. This is a bad thing, what you should be sending back is exactly the same date the server sent you when you received the file. There's two reasons for this. Firstly, your computer's clock is unlikely to be exactly synchronised with the webserver, so the server could still send you files by mistake. Secondly, if the server programmer has followed this guide (see below), it'll only work if you send back exactly what you received.

Server Implementation for Static Files

If you are using one of those weblogging tools that just sticks regular files on a regular webserver (e.g. or Moveable Type), your webserver will almost certainly already follow the get standard. HTTP 1.1 has been around 31 years now, and there's really not much of an excuse for anyone to not be following it.

One thing you'll have to watch out for, though, is if your site's RSS file is regenerated frequently even when it's not changed. If that happens, the server won't be able to keep track of the last modified time properly, and you'll get people downloading the file even when it's not changed. The solution is for the writers of weblogging tools to optimise their software to make sure that files are only updated if they've actually changed in some way. (i.e. have them generate the new file, compare it with the old one, and if they're the same leave the old one untouched.)

Server Implementation for Dynamic Content

If you've got a weblogging tool that re-generates the RSS file every time a request is made, there's a little more work to do. This section is aimed more at the writers of the tools than at the user, because it's the tool writers that need to fix their software so that it follows the specs.

I'll concentrate purely on RSS files, but the concepts used here can be applied to any page in the weblog, and may further reduce the bandwidth usage for your users.

In your RSS feed generator, you'll have to keep track of two values: the time the file was last modified (converted to Greenwich Mean Time), and an “etag”. According to RFC2616, the etag is an “opaque value”, which means you can put anything you like in it, providing you stick double-quotes around the whole lot. The time in the Last-Modified header needs to be formatted in a certain way, though, the same format used in email headers. For example, ‘Mon, 17 Sep 2001 11:54:29 GMT’.

Whenever someone requests your RSS file, send those values for the Last-Modified and Etag headers. Every web scripting language allows you to add and remove headers like that at will, just check the manual if you don't know how.

Now for the other bit. Whenever someone requests your RSS file, check the headers of their request for an If-Modified-Since header, or an If-None-Match header. If either of them are there, and if [deleted either ] both of them match the values you were planning to send out with the file, then don't send the file. Once again, consult your manual to see how to send back a "304 Not Modified" reply instead of the "200 OK" that you normally would. If you send back the 304 reply, you don't have to generate the RSS file at all. Just send out the headers, followed by two linefeeds to show the headers are done, and the client will know there's nothing else coming.

Technically, what you should do with an If-Modified-Since header is convert it to a date, and compare it with your stored date. However, 90% of the time you can get away with just doing a straight match, so it's probably not worth the effort.

How do I calculate the Last-Modified date?

Easy. It's the time that the most-recently-changed item in the RSS file was modified. Something like that should be pretty easy to store and fetch.

What should I put in an etag?

The Apache server uses a hash of the contents of the file. This isn't necessary though. All the eTag has to be is something that changes every time the file changes. So it could be a version number, or it could even be exactly the same as the Last-Modified date, just in double-quotes.

2002-11-11 Update: A number of people have written to me to remind me of HTTP's Gzip Content-encoding (compressing the files during transfer). This is a little beyond the scope of this essay. The worst thing you can do when suggesting a solution to a problem is to provide alternatives, people end up arguing the alternatives instead of implementing the fix.

17.7.08

Tutorials on htaccess | LearnWebDesignOnline.com

Tutorials on htaccess | LearnWebDesignOnline.com: "Tutorials on htaccess

.htaccess (dot-htaccess) is the directory-level configuration file of the Apache web server. It has a lot of control over how your web server works. Here are some tutorials about it.

* Wikipedia entry of .htaccess
* htaccess-guide.com
* Apache tutorial
* Example usage of .htaccess

For example, the following in the .htaccess file


Deny from all


will make sure that people can not browse inc and class files.

And ...

IndexIgnore *

will prevent browser from directory listing your files on your server."

Some useful tips to optimize your PHP code « CarlosPSY’s Weblog

Some useful tips to optimize your PHP code « CarlosPSY’s Weblog: "Some useful tips to optimize your PHP code

I’ve found very useful tips to optimize your PHP Code, and accelerate the script execution.

1. If a method can be static, declare it static. Speed improvement is by a factor of 4.
2. echo is faster than print.
3. Use echo’s multiple parameters instead of string concatenation.
4. Set the maxvalue for your for-loops before and not in the loop.
5. Unset your variables to free memory, especially large arrays.
6. Avoid magic like __get, __set, __autoload
7. require_once() is expensive
8. Use full paths in includes and requires, less time spent on resolving the OS paths.
9. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()
10. See if you can use strncasecmp, strpbrk and stripos instead of regex
11. str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4
12. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one"

16.7.08

Index of /rdf

[   ] ATAG10.rdf                       22K  Authoring Tool Accessibility Guidelines 1.0
[   ] CCPP-struct-vocab.rdf 26K Composite Capability/Preference Profiles CC/PP Structure and Vocabularies 1.0
[   ] CSS2.rdf 12K Glossary of Cascading Style Sheets, level 2 CSS2 Specification
[   ] DOM-Level-2-Events.rdf 4.6K Glossary of Document Object Model (DOM) Level 2 Events
[   ] DOM-Level-2-HTML.rdf 5.5K Glossary of Document Object Model (DOM) Level 2 HTML Specification
[   ] DOM-Level-2-Traversal-Range.rdf 5.1K Document Object Model (DOM) Level 2 Traversal and Range Specification
[   ] DOM-Level-3-Events.rdf 27K Document Object Model (DOM) Level 3 Events Specification
[   ] MathML2.rdf 39K Mathematical Markup Language (MathML) Version 2.0
[   ] P3P.rdf 13K The Platform for Privacy Preferences 1.0 (P3P1.0) Specification
[   ] PNG.rdf 47K Portable Network Graphics (PNG) Specification (Second Edition)
[   ] Process.rdf 6.7K World Wide Web Consortium Process Document
[   ] REC-xml-names.rdf 5.7K Namespaces in XML
[   ] REC-xml.rdf 40K Extensible Markup Language (XML) 1.0
[   ] WCA-terms.rdf 40K Web Characterization Terminology Definitions Sheet
[   ] available_lang.rdf 6.8K
[   ] charreq.rdf 7.7K Requirements for String Identity Matching and String Indexing
[   ] copy.xsl 166
[   ] di-gloss.rdf 58K Glossary of Terms for Device Independence
[   ] home2rss092.xsl.xml 4.6K
[   ] hypertext-terms.rdf 20K Hypertext Terms
[   ] index.rdf 20K
[   ] owl-guide.rdf 17K OWL Web Ontology Language Guide
[   ] qa-glossary.rdf 9.2K W3C QA - Quality Assurance glossary
[   ] qaframe-spec.rdf 12K QA Framework: Specification Guidelines
[   ] rdf-mt.rdf 24K RDF Semantics
[   ] rdf-syntax.rdf 6.3K Resource Description Framework (RDF) Model and Syntax Specification
[   ] rfc2616-sec1.rdf 17K Hypertext Transfer Protocol -- HTTP/1.1
[   ] ruby.rdf 9.4K Ruby Annotation
[   ] soap12-part1.rdf 15K SOAP Version 1.2 Part 1: Messaging Framework
[   ] used_lang.rdf 902
[   ] uuag10.rdf 91K User Agent Accessibility Guidelines 1.0
[   ] voicexml20.rdf 23K Voice Extensible Markup Language (VoiceXML) Version 2.0
[   ] w3c-jargon.rdf 19K Glossary of W3C Jargon
[   ] wcag10.rdf 27K Web Content Accessibility Guidelines 1.0
[   ] weaving.rdf 61K Glossary of
[   ] ws-gloss.rdf 99K Web Services Glossary
[   ] xforms.rdf 12K XForms 1.0
[   ] xhtml-modularization.rdf 19K Modularization of XHTML
[   ] xhtml1.rdf 11K XHTML 1.0: The Extensible HyperText Markup Language (Second Edition)
[   ] xkms2-req 12K
[   ] xlink.rdf 18K XML Linking Language (XLink)
[   ] xml-names.rdf 1.6K Namespaces in XML 1.0
[   ] xml-names11.rdf 9.2K Namespaces in XML 1.1
[   ] xml11.rdf 41K Extensible Markup Language (XML) 1.1
[   ] xmlschema-2.rdf 11K XML Schema Part 2: Datatypes
[   ] xpath-datamodel 21K
[   ] xpath-datamodel.rdf 21K XQuery 1.0 and XPath 2.0 Data Model (XDM)
[   ] xpath.rdf 7.4K XML Path Language (XPath)
[   ] xpath20 49K
[   ] xpath20.rdf 49K XML Path Language (XPath) 2.0
[   ] xptr-framework.rdf 8.0K XPointer Framework
[   ] xquery 79K
[   ] xquery.rdf 79K XQuery 1.0: An XML Query Language
[   ] xslt20 81K
[   ] xslt20.rdf 81K XSL Transformations (XSLT) 2.0