Archive
Readable URLs are nice. A well made website will have a logical layout, with intelligent folder and file names, and as few technical details as possible. In the most well designed sites, readers can guess at filenames with a high level of success. Clean URLs are great because they.
Ever wanted to change the crontab of a server, but got an editor on screen that you're totally unfamiliar with? There are a lot of causes for this annoyance, but one is that somebody recently installed or used midnight commander (mc) which for whatever reason seams to overrule your session's default editor.
I ran accross php value, php flag, php admin value and php admin flag in a couple of .htaccess files, and I've used them sometimes as well by just pasting an example, but I've never really understood why there was such a great diversity. Couldn't php_setting X Y just handle it, and if not, what do the admin, value and flag attributes mean?
I recently had to install a couple of squid servers to act as reverse proxies for a webcluster. You can teach the squid server to stand in between in the end users and the webservers, and to store all the static content ( .jpg .flv .css .htm for example ) in the RAM. This saves a lot of I/O and bandwidth on the webservers, and it can really speeds up a site. And the end of the road the webservers' load dropped with 92%. But before all this worked, I had to run through a massive config file and since the squid config file is their manual at the same time, it's about 5000 lines long. So I had to find out a way to filter only the important settings from the config file.
You want your website to be as safe as possible. So you'll typically want Open Basedir and Safe Mode to be on. When you're in a shared hosting environment, you'll find that any server administrator with a good sense of security will also have these restrictions in place. However security pretty much always limits functionality and this case is no different. Because what if you are caged in a restricted environment, and you would still like to use shared libraries like the ones provided by PEAR?
I scourged the web today looking for the very best (and free) tips on increasing a site's PageRank, and I figure it basically comes down to these simple tips.
Last friday, PHP announced the end of life of version 4 of their popuplair scripting language.
Let's say your site is becoming a big success and as a result it's becoming slower and slower. There are several things you do without buying additional hardware.
If you're running Squid to cache your website, you can use an htaccess file to control what kind of files should be cached, and for how long.
Everyone knows that RAM is so much faster than a hard disk. To illustrate, while a current SATA disk has peak transfer rates of 375 MB/s, current RAM can do a mind blowing 12,500 MB/s! Normally only the system itself makes use of this ultra fast storage, but we can also access this space directly. And that opens a great window of opportunity.
When you've written an article that benefits other surfers, you want them to know, right? One way to go about this is to publish your article at Digg. Making it to their FrontPage would be totally awesome. Good content is the main thing there, but there are some other tips that can help you. I did quite a bit of research - so you don't have to - and this is my top 5.
The stable version of the newest Ubuntu version Gutsy Gibbon will be released in October 2007. I could not wait that long however. And since the third alpha of Ubuntu 7.10 was recently released, I figured let's give it a shot. Testing alpha releases (especially from Ubuntu ) is like looking into the crystal ball of technology. This is how I upgraded and got compiz working again.
Not everyone knows about PHP's capabilities of making SSH connections and executing remote commands, but it can be very useful. I've been using it a lot in PHP CLI applications that I run from cronjobs, but initially it was a pain to get it to work. The PHP manual on Secure Shell2 Functions is not very practicle or thorough for that matter, so I would like to share my knowledge in this how to, to make it a little less time consuming setting this up.
According to Mark Shuttleworth, founder of the Linux distribution Ubuntu, Dell is pleased with the demand for Ubuntu computers. The company has been distributing computers with Ubuntu since May this year and is planning to expand the Linux offerings.
Since 2005 there has been an immense increase in brute force SSH attacks and though Linux is pretty secure by default, it does not stop evil programs from indefinitely trying to login with different passwords. Without proper protection your server is a sitting duck waiting for a bot to guess the right combination and hit the jackpot. But with just 2 commands we can stop that.
Warning. This article is meant for Ubuntu Feisty only and is therefore deprecated! Compiz-fusion comes standard in more recent Ubuntu versions, so don't use this article anymore! I would have taken this article offline if it wasn't for the fact that there are still some Feisty users out there who find this useful.
If you're in the midst of upgrading from Feisty to Gutsy, read howto upgrade to Ubuntu Gutsy without breaking compiz-fusion!
If you've got a website that's heavy on your web server, you might want to run some processes like generating thumbnails or enriching data in the background. This way it can not interfere with the user interface. Linux has a great program for this called cron. It allows tasks to be automatically run in the background at regular intervals. You could also use it to automatically create backups, synchronize files, schedule updates, and much more. Welcome to the wonderful world of crontab.
Making sure your system is up to date is a key attribute to it's security. Furthermore Ubuntu releases updates pretty often and you probably don't want to miss out on added stability and features. You could run updated manually, but why not schedule the updates in the background to make sure you are always running the latest stable versions, without ever having to worry about it.
CDs and DVDs don't have the eternal life, so you might want to back them up as ISO images. All the files and properties of the original disc, stored in a single file. You can also create ISO images and store them on your network for easy distribution of software installations. Here's how to create and mount ISO images on Linux.
Every time a request hits your server, PHP has to do a lot of processing, all of your code has to be compiled & executed for every single visit. Even though the outcome of all this processing is often identical for both visitor 21600 and 21601. So why not save the flat HTML generated for visitor 21600, and serve that to 21601 as well? This will relieve resources of your web server and database server because less PHP often means less queries.
Recently two of my articles reached the Digg frontpage at the same day. My web server isn't state of the art and it had to handle gigantic amounts of traffic. But still it served pages to visitors swiftly thanks to a lot of optimizations. This is how you can prevent heavy traffic from killing your server.
It's always a good idea to backup important data. Your files and settings can easily be archived. But how can you backup & restore all applications that you've installed over the last couple of years? Here's an easy trick that works for both desktops & servers, and that can also be used to synchronize installed packages in a web cluster, making all the servers run the same software.
Deleting a file or reformatting a disk does not destroy your sensitive data. The data can easily be undeleted. That's a good thing if you accidentally throw something away, but what if your trying to destroy financial data, bank account passwords, or classified company information. What if you want to clean your computer before selling it for instance?
A good way for sites or articles to get known is submitting to social bookmarking sites, so submitting should be as easy as possible for your visitors. But gathering information on the best social bookmarking sites, their icons, submission URLs, and ranking is quite a pain. And so I did it for you. I'll also give you a PHP example of how to integrate social bookmarking sites in your website.
Synchronizing files from one server to another is quite awesome. You can use it for backups, for keeping web servers in sync, and much more. It's fast and it doesn't take up as much bandwidth as normal copying would. And the best thing is, it can be done with only 1 command. Welcome to the wonderful world of rsync.
With SSH you can securely login to any Linux server and execute commands remotely. You can even use SSH to transfer and synchronize files from one server to another. Automating these tasks can make your life easier, but normally SSH prevents that because it requires you to login every time. Well, not anymore, in this article I will show you how to connect to SSH without a password.
A couple of years ago when everyone still had giant CRT monitors, resolutions of 1600x1200 were pretty common. Nowadays however 19" TFT monitors often cannot scale higher than 1280x1024. So how can we still fit more on one screen? DPI can help!
Recently I've seen a lot of screencasts in the Planet Ubuntu RSS feed. A screencast is an embeded flash video of your desktop, often used in tutorials instead of screenshots. I wondered if I could make these online flash videos myself; turns out, it's pretty easy! So in this article I will cover how to install the video capturing tool, how to use it, how to convert the video to a flash video (flv) file, and finally how to embed a flash player in your site just like YouTube. Create your own screencasts in 5 easy steps!
If you're like me and you're interested in the stats of your website or blog, you might also want to know how many Diggs all of your articles have received. But that can become quite a pain when you have more and more articles, pages or blog posts. So why not let PHP retrieve the Digg count of your articles so you can use it in graphs or other statistic tools?
It's no secret I like Ubuntu the best. But what strikes me as odd, is that it does not come standard with a good tool to change the display settings. Sure, you can change the Screen Resolution, but what about cloning to another device, extending the desktop to a second screen, changing the driver, or adjusting the refresh rates to enable more resolutions? There currently is no graphical way to do this in GNOME, so for this you had to manually change the X config file, or run a third party tool like nvidia-settings. But now I found a great GTK tool that can do it for you.
I recently faced a programming challenge that almost broke my brain. I needed to create a function that could explode any single-dimensional array into a full blown tree structure, based on the delimiters found in it's keys. Tricky part was size of the tree could be infinite. I called the function: explodeTree. And maybe it's best to first look at an example.
I often hear about people who want to upgrade their version of Ubuntu with tools like apt-get, but if you run a desktop version of Ubuntu, there is a much better tool called update-manager. There are a lot of ways to upgrade Ubuntu. But this one is the best.
In Ubuntu Feisty I've been using compiz-fusion from Treviño’s Ubuntu Repository in combination with a nVidia driver provided by Envy like in this how-to. Running those cutting edge Feisty versions allowed me to have all the nice features that were being developed and lose some bugs that persisted in stable versions, like black windows & strange borders.
But two months ago I upgraded to Gutsy and you will be happy to know that Ubuntu Gutsy has got every awesome feature & bugfix in it's ...
Running compiz-fusion for some time, one thing started to annoy me. Snapping windows. The first thing I obviously looked for was the Snapping Windows Plugin. But that was already disabled.
I'm blogging the setting that controls this behavior because it took me some time to find it, I think other people may find it contra productive as well.





