Ubuntu scratchpad
Fra Harald Grovens wiki
Useful stuff i tend to forget about running Ubuntu
restart mysql (ubuntu default location)
sudo /etc/init.d/mysql start
restart Apache
sudo /etc/init.d/apache2 restart
Starte Tomcat
sudo /etc/init.d/tomcat5.5 start sudo /etc/init.d/tomcat5.5 restart
Set up a SSH tunnel
ssh -L 7777:localhost:3306 geek@webserver.com
Change screen resolution w ATI monitor card
sudo aticonfig --dtop=horizontal --mode2=1600x1200
Clean html using command line tidy
harald@harald-laptop:~$ tidy --add-xml-decl y --bare y --clean y --hide-comments y --output-xhtml y --show-body-only y --indent "auto" --wrap "90" --char-encoding "utf8" --input-encoding "utf8" --output-encoding "utf8" ~/Desktop/dirtyhtml.html >> ~/Desktop/clean.html
Laste ned side, vaske HTMLen med Tidy og lagre på skrivebordet
harald@harald:~$ wget -q -O - http://www.samordnaopptak.no/restetorget/studiumliste.html | tidy --add-xml-decl y --bare y --clean y --hide-comments y --output-xhtml y --show-body-only y --indent "auto" --wrap "90" --char-encoding "utf8" --input-encoding "utf8" --output-encoding "utf8" >> ~/Desktop/clean.html
Open Wifi-shortcut
nm-applet
It's now as easy as: sudo a2enmod rewrite To disable this module it's just: sudo a2dismod rewrite with Apache version 2, the httpd.conf has been deprecated and the new file is located at: /etc/apache2/apache2.conf in this file you need to add your directory and the allow override to give access to your drupal site. so look for a section in your apache2.conf that has Directory tags and just add another section: <Directory /var/www/drupal_website_install> AllowOverride all </Directory>
Liste opp alle filer i en katalog med filbane. Fx i kagalogen /home/harald/current og av type xml
find ~/current | grep xml

