It becomes a hassle hopping between servers with ssh if you have to type the password each time. To enable passwordless ssh go:
> ssh-keygen -t dsa (ENTER to skip password)
> scp ~/.ssh/id_dsa.pub user@other_server
And on the other server:
> cat ~/id_dsa.pub >> ~/.ssh/authorized_keys
> rm ~/id_dsa.pub
Now you can hop between servers without a password. I only do this for servers that I can afford to be compromised.
Thursday, February 28, 2008
Saturday, February 16, 2008
Extracting tar balls
I always forget the flags:
tar -xvvf file.tar
tar -xvvzf file.tar.gz
tar -zxvf file.tgz
tar xjvf file.tar.bz2
tar -xvvf file.tar
tar -xvvzf file.tar.gz
tar -zxvf file.tgz
tar xjvf file.tar.bz2
Friday, February 15, 2008
Moving and svn repository
To move an svn repository first dump it to a file with:
> svnadmin dump /path/to/repository > svn.dump
Now to create the new repository go:
> svnadmin create new_repository_name
> svnadmin load new_repository_name < svn.dump
> svnadmin dump /path/to/repository > svn.dump
Now to create the new repository go:
> svnadmin create new_repository_name
> svnadmin load new_repository_name < svn.dump
Wednesday, January 30, 2008
Mediawiki upload settings
By default the Mediawiki upload settings are too restrictive because they deny most filetypes. And changing the file extension is not enough because Mediawiki also checks the mime type. As a quick and dirty to allow what you want open LocalSettings.php and add:
$wgStrictFileExtensions = false;
$wgCheckFileExtensions = false;
$wgVerifyMimeType = false;
$wgStrictFileExtensions = false;
$wgCheckFileExtensions = false;
$wgVerifyMimeType = false;
Sunday, January 20, 2008
Mediawiki printing
By default mediawiki includes header and footer information, which looks unprofessional when printing. To disable this open up skins/common/commonPrint.css and add:
#footer {
display: none;
}
.printfooter {
display: none;
}
#bodyContent {
font-family: courier;
}
#footer {
display: none;
}
.printfooter {
display: none;
}
#bodyContent {
font-family: courier;
}
Tuesday, January 15, 2008
Mediawiki sidebar
To change the Mediawiki sidebar login as sysop and edit the page 'MediaWiki:Sidebar'. Note that the default sysop login name is WikiSysop.
Saturday, January 12, 2008
Mediawiki refresh
To force Mediawiki to refresh anything it has cached just update LocalSettings.php:
> touch /var/lib/mediawiki/LocalSettings.php
> touch /var/lib/mediawiki/LocalSettings.php
Subscribe to:
Posts (Atom)