30 December, 2009

How to use CodeIgniters template parser

This little tutorials shows how you can use CodeIgniters template parser. I like to use this utility to make my HTML code more readable and keep PHP code out of design files. It's also easier to write documents based on this.

28 December, 2009

How to build .deb package from source

Instructions for building a .deb file from source files. Most errors you get while compiling is that you might have to install some packages from aptitude.

Copy files to temp:

cp -r '/dir/of/the/source/files' /tmp

Go to the copied files:

cd /tmp/source-dir-name

While doing dh_make press "s" for the first question and "enter" for the second one:

dh_make --createorig

Build the package:

dpkg-buildpackage -rfakeroot

.deb file should appear into your /tmp directory if building was successful.

27 December, 2009

GoonZu classes guide

Made by: rappwr
              Luminary has six different weapon classes to choose among. Three of classes are melee and other three are ranged. Axer, spearman, swordsman belong to melee group and bowman, caner, gunner belong to ranged group. Each weapon class has its 19 different weapons of its kind from level 0 to level 110 kind of weapon.

26 December, 2009

Archive using linux terminal.

Just some commands about archiving for command line. Should work on all Linux distributions.

Make .zip archive:

zip -r name_for_the_zip_file.zip file/or/dir/i/want/to/zip

Extract .zip archive:

unzip dir/to/the/file.zip

Make .rar archive:

rar a name_for_the_rar_file.rar file/or/dir/i/want/to/rar

Extract .rar archive:

rar e dir/to/the/file.rar

Make .tar archive:

tar cf name_for_the_zip_file.tar file/or/dir/i/want/to/tar

Extract .tar archive:

tar xf dir/to/the/file.tar

Make .tar.gz archive:

tar czf name_for_the_zip_file.tar.gz file/or/dir/i/want/to/gzip

Extract .tar.gz archive:

tar xzf dir/to/the/file.tar.gz

Make .tar.bz2 archive:

tar cjf name_for_the_zip_file.tar.bz2 file/or/dir/i/want/to/bzip

Extract .tar.bz2 archive:

tar xjf dir/to/the/file.tar.bz2

22 December, 2009

How to install ssh with sftp server?

I wanted to install ftp server on my little home server. So I googled it. I found out that it would be safer to use sftp instead of ftp, which would be file transfer for ssh. It's also easier you can just type ssh://username@www.example_domain.com in your nautilus and if you see your files then you have successfully logged in. You can easily make new users and give them permissions through ssh configuration files.

To enable it you need ssh server, if you don't have it:

sudo apt-get install openssh-server

Then you have to change a row in your OpenSSH server configuration file:

sudo nano /etc/ssh/sshd_config

Replace the line:

Subsystem sftp /usr/lib/openssh/sftp-server

with:
Subsystem sftp internal-sftp


NB: This works on Debian and all distributions based on it, like Ubuntu. The default port is 22 for ssh so you probably want it to be opened, if you want to access your sftp outside lan.