bash SCREEN!

Tuesday, April 29th, 2008

screen

ctrl a then the screen number

ctrl a, ctrl c creates a new screen

ctrl a, ctrl c to change the name

Windows server 2003 resource kit

Monday, April 28th, 2008

http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

http://www.windowsnetworking.com/articles_tutorials/Windows-Server-2003-Resource-Kit.html

Phase listeners run twice JSF

Thursday, April 17th, 2008

This is a bit of an odd one. A phase listener will run twice only if you tell it! That’s right a computer only does what you tell it!

One common problem with JSF is that you install a phase listener and it runs twice for each phase (that is 4 times for each phase – two invocations of the beforePhase method and two invocations of the afterPhase method). Why and how to solve it?

If you look at the JSF specification (JSF 1.1) on section 10.3.2 the application startup behavior is defined, and it says that the JSF must process zero or more configuration resources using the following algorithm:

  1. All resources named ‘META-INF/faces-config.xml’ in the ServletContext resource path of this webapp.
  2. Check for the ‘javax.faces.CONFIG_FILES’ initialization parameter (that is a context parameter in the web.xml file). If exist treat it as a comma-delimited list of context relative resource paths. And load each resource.
  3. Check for the existing of a web application configuration resource named ‘/WEB-INF/faces-config.xml’. And load it.

Now when we first start a new JSF webapp application we create it with a configuration resource named WEB-INF/faces-config.xml, and then at the web.xml file we announce this configuration resource:

http://www.jroller.com/eyallupu/category/Web-Container

video on nokia n95

Sunday, April 13th, 2008

http://www.n95users.com/forum/general-95/2207-convert-dvd-nokia-n95.html

Uploading images tiny MCE

Saturday, April 12th, 2008

God I hate php….

http://pascal.vanhecke.info/2005/08/25/image-upload-plugin-for-tinymce/

Then (summarized from readme.txt for a simple setup, have a look at it if you want to know more):

  • download the latest version, unzip and upload the Ibrowser files to tiny_mce\plugins\ibrowser
  • select the one, 2 or more directories you want to be able to insert images from and and upload to and indicate them with easy to understand names (that will show up in the interface) in config/config.inc.php:

    $cfg['ilibs'] = array (
    array (
    ‘value’ => ‘/path/from/webroot/images/’,
    ‘text’ => ‘Sprekers’,
    ),
    array (
    ‘value’ => ‘/path/from/webroot/gallery/’,
    ‘text’ => ‘Sponsors’,
    ),
    );
  • chmod these directories and additionally the directories ibrowser/scripts/phpThumb/cache and ibrowser/temp to 755 or 777 (depending on the privileges your webserver has - try with 755 first if you’re not sure)
  • copy tinyMCE.editor_plugin.js file into the iBrowser plugin directory and rename it to “editor_plugin.js”
  • somewhere in an included or inline javascript, you should have the “tinyMCE.init” statement, configuring your TinyMce setup:

    Example for the latter:

    tinyMCE.init({
    ...
    plugins : "ibrowser",
    ...
    theme : "advanced",
    theme_advanced_buttons3_add : "ibrowser",
    });

JSON for php

Monday, April 7th, 2008

http://pear.php.net/pepr/pepr-proposal-show.php?id=198

SCP only users UBUNTU

Monday, April 7th, 2008
apt-get install scponly #answer yes to the question in the blue dialogue about scponlyc and suid
cd /home/
mkdir jails
chown root jails
chmod 755 jails
cd jails/
cd /usr/share/doc/scponly/setup_chroot
gunzip setup_chroot.sh.gz
chmod u+x setup_chroot.sh
./setup_chroot.sh

----
setup_chroot.sh is interactive and will prompt for the following information for each user you want to set up:
username to install:
home directory you wish to set for this user:
name of the writeable subdirectory:

http://ubuntuforums.org/showthread.php?t=451510

another php cms to have a look at

Saturday, April 5th, 2008

http://textpattern.com/

JavaScript testing

Wednesday, April 2nd, 2008

http://jania.pe.kr/aw/moin.cgi/JSSpec