Skip to content

tool - zend framework zf cli aka zend tool

Just a quick entry for the zend framework comand line tool (available for *nix and windows). I tought it would be a good idea to use it and create the general files or directory layout. But it is not perfect at all. Creating modules and layouts is quick nice. But a

zf create controller myModuleName
does not what i have expected. An controller was created below the general controller directory and not inside the module "myModuleName". Lets see if i like the tool at all. I will stick on it for this project and fill up the links in the following section when i find some usefull one. I can give one hint so far, the zend tool can only create, not delete anything. If you want to delete something, you have to do it manualy (remember the zfproject.xml file).

available parameters for application.ini official zend tool manual using the cli tool create a layout zend tool in phpstorm zend framework as cli application tutorial from akrabat Proposed Q&A site for PHP developers using Zend Framework 1 and Zend Framework 2

howto - mount filesystem via ssh using sshfs

First of all, you have to install "sshfs". After that you just have to type.

sshfs $user@$host:/path/to/dir /path/to/mount
If fuse throws an error of permission, you have to add your user to the group fuse by typing:
usermod -a -G fuse $user
After you re-logged-in you can see by typing "groups" in your shell that everything is done fin. Do not want to logoff? Try
su $user
in your shell. This is a new login and so your new group is available now. Just another hint, if you want to access symbolic links, try:
-o follow_symlinks
and/or
-o transform_symlinks
The man page will help you to understand what you are doing. Now put everything as an alias in your bashrc (or something similar) and you are done :-).
alias mountMyShare="sshfs $user@host:/path/to/dir /path/to/mount -o follow_symlinks"; alias umountMyShare="fusermount -u /path/to/mount";
Happy mounting and unmounting.

bash - unrar more than one file in separate directories

Long story short, here is the script.

#!/bin/sh for f in \*.rar do mkdir ${f%.rar} unrar e $f ${f%.rar}/ done
What does it? For every *.rar file in you current directory, a subdirectory will be created by using the filename except of '.rar'.

Just use this script on your command line.

sh ~/my/path/to/the/script.sh
Thats it, have fun :-).

It should not be that problem to adapt this script to other types of archive.

Want to know more about bash scripting and string manipulation? Try to check the following links. string manipulation special parameters