Archive for the ‘Linux’ Category.
May 4, 2010, 7:06 PM
There’s new Ubuntu version and of course some drivers don’t work properly in the Netbook….
To fix the Video card:
UPDATE:
Finally something that works good, and official.
wget http://dl.dropbox.com/u/1338581/Gma500/scripts/poulsbo.sh && sh ./poulsbo.sh
Continue reading ‘Ubuntu 10.04 Lucid Lynx in Eee PC 1101HA’ »
April 23, 2010, 11:32 AM
I use SVN kind of a lot, and when I need to pack the files to distribute them is not nice to leave the SVN files..Here a really simple way of deleting those anoying files:
find . -name '.svn' -type d | xargs rm -rf
This searches for all directories which have svn related files. This is a useful command, but might not work as expected if there are hundreds of thousands files on the server. In this case the following command may be useful:
find . -name .svn -prune -exec rm -rf {} \;Source devarticles.in
April 17, 2010, 12:22 PM
Is not bullshit I swear! Absolutely possible, but you need to be using a VPS or a dedicated server to do this.
This is really handy if you are not using a cache system such as APC or xcache, and you store your cached files in folders.
For this we will use TMPFS
Tmpfs is like a ramdisk, but different. Like a ramdisk, tmpfs can use your RAM, but it can also use your swap devices for storage. And while a traditional ramdisk is a block device and requires a mkfs command of some kind before you can actually use it, tmpfs is a filesystem, not a block device; you just mount it, and it’s there. All in all, this makes tmpfs the niftiest RAM-based filesystem I’ve had the opportunity to meet.
Example to use it in your WordPress:
(check the right paths)
Edit /etc/fstab/ and we add the file system
tmpfs /home/neo22s/wp-content/cache tmpfs defaults,size=2g,noexec,nosuid,uid=648,gid=648,mode=1755 0 0
Add a new line at /etc/rc.local in order to execute it on system start up:
ionice -c3 -n7 nice -n 19 rsync -ahv --stats --delete /_b/tmpfs/cache/ /home/neo22s/wp-content/cache/ 1>/dev/null
New crontab job (using crontab-e), to execute
*/5 * * * * /usr/bin/ionice -c3 -n7 /bin/nice -n 19 /usr/bin/rsync -ah --stats --delete /home/neo22s/wp-content/cache/ /_b/tmpfs/cache/ 1>/dev/null
Done!
Currently I’m not using this method since I have xcache that make my life easier working with w3 total cache plugin, great solution.
Of course you can use TMPFS for many other things, check askapache, where you can find loads of info and examples a great work.
April 6, 2010, 11:55 PM
This is a really simple yet handly tip to redirect your feed to Feedburner.
Edit, or create an .htaccess file in your htdocs root, and add this lines:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule ^rss/$ http://feeds.feedburner.com/yourURL [R,L]
</IfModule>Now any request to yoursite.com/feed will be redirected to the custom feedburner feed ;)
Be aware that only works in apache.
April 6, 2010, 12:15 AM
Redirect your visitor to maintenance page is a must when you are upgrading your site. Now you can redirect your user to maintenance page easily by using .htaccess file. I guess you do not want your visitor to see an error page or 404 page during your server upgrade. So just follow the steps below to create a .htaccess file to redirect your visitor to maintenance page during upgrade:
1- Create a file and name it .htaccess with the content below:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteRule $ /maintenance.html [R=302,L] Continue reading ‘Site in Maintenance using .htaccess’ »