Sense or Nonsense!?

21.10.2009

-sh: ./progam: File or Directory not found

Filed under: Linux — Ephraim @ 15:48

Today I ran into the problem on a linux box:
-sh: ./progam: File or Directory not found

Doesn’t matter what I tried, it always dumped that §$*&#§$*@”*§*$§&/ error.

So guess what it was …
I was on a 64 bit machine and the program was 32 bit.
So if you have a smiliar problem, make sure you have installed lib32gcc1 (or any corresponding 32 bit layer for 64 bit machines).

Ciao Ephraim

09.10.2009

XEP-0016: Privacy Lists; for Prosody

Filed under: Jabber — Ephraim @ 22:48

I currently finished work at the mod_privacy module for prosody!!
It’s far from being stable, but AFAI have tested it, it worked as I expect it to!
So have a look at: prosody-modules
or a direct link to mod_privacy.lua: here

Have a look at mod_adhoc and commands too! There is a “XEP-0133: Service Administration” implementation growing :)

Have fun! prosody rocks!!

ciao Ephraim

28.07.2009

Migrated to prosody

Filed under: Jabber — Ephraim @ 09:39

So, yesterday I heard about prosody, a jabber server implemented in Lua. After some ground testing, I connected to the room of prosody and found a nice small community with friendly people, who answered all my question very nicely.
After that and the result of my testing, I decided to give prosody a try. Cause of the migrate script from ejabberd2 to prosody, it was easy as hell to migrate everything to prosody. I think it took me less than an hour to migrate the jabber stuff.
Later the day I migrated my transports. This took most of the time, but only caused by me, doing it not how the docu says to do it.

Now I’ll see if it is as nice as I think it is. One argument for me to migrate was the thing, that I’m able to develop modules with a script language (remember, it is build totally in Lua) and that I’m able to re/load the currently developed module on the fly while the server is online. Thats really nice, so I can learn Lua without any problems e.g. need to restart the server or so.

If you want to migrate or setup a jabber server with prosody too, I think I can say don’t hesitate to ask your questions at prosody@conference.prosody.im or ask me at ephraim@0×10.de.

Ciao Ephraim

16.07.2009

THE missing functions in windows …

Filed under: Windows — Ephraim @ 15:15

Here are the two functions I often missed in the windows C/C++ libraries …

#include <sys/types.h>
#include <sys/stat.h>

bool file_exists(const TCHAR* lspzFile) {
	int i;
	struct _stat s;

	if(!lspzFile) return false;

	i = _tstat(lspzFile, &s);

	if(!i && (s.st_mode & _S_IFREG) != 0)
		return true;
	else
		return false;
}

bool dir_exists(const TCHAR* lspzDirectory) {
	int i;
	struct _stat s;

	if(!lspzDirectory) return false;

	i = _tstat(lspzDirectory, &s);

	if(!i && (s.st_mode & _S_IFDIR) != 0)
		return true;
	else
		return false;
}

Ciao Ephraim

07.07.2009

Creating a WinPE 3.0 ISO with Windows AIK and mkisofs

Filed under: Windows — Ephraim @ 13:57

When you have succeeded in downloading and installing Windows AIK for Windows 7 and wonder how you can create a WinPE 3.0 CD now, you are in the same situation as I was some time before.

Of course you can use WinBuilder or PEBuilder or such things, but if you need to do anything by hand, then you’ll need to go the same way as I did.

First of all you can create a basic WinPE 3.0 ISO content with the copype.cmd of the Windows AIK installation.
Just navigate to the folder, containing copype.cmd and fire up the following command (my WinPE working folder is here C:\WinPE, but you can name this as you want):

copype.cmd x86 C:\WinPE

This will copy some files/folders to C:\WinPE.
One folder is called ISO, this is the WinPE 3.0 ISO Content folder, where later your ISO will be created from.
And one file is called winpe.wim, which is the start windows image file.

If you want to have a very basic WinPE, you can skip the next steps and go over to copying the WIM.
I needed to include WMI in the WinPE so I need to include WMI Package into the wim.
For that you will need to mount the WIM, this can be done by the following command:

imagex.exe /mountrw C:\WinPE\winpe.wim 1 c:\WinPe\mount

This will mount the wim to C:\WinPE\mount.
Then you need to install the WMI Package from Windows AIK into the mounted WIM.

dism.exe /Image:C:\WinPE\mount /add-package /packagepath:<winAikFolder>\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab

So now just umount and commit the wim by executing the following command:

imagex.exe /unmount /commit c:\WinPe\mount

Copying the WIM; The winpe.wim needs to be copied to the ISO Folder. And it must go into the Sources folder as boot.wim.

xcopy c:\WinPE\winpe.wim C:\WinPe\ISO\Sources\boot.wim

Ok, so far the preperations of the WinPE 3.0 ISO Content folder is done.
Now we need to create a ISO of the folder.
For this job, I used the mkisofs.exe, with the following commandline:

mkisofs.exe -iso-level 4 -allow-lowercase -volid "MyWinPe" -b "boot/etfsboot.com" -no-emul-boot -boot-load-size 8 -hide boot.catalog -o C:\WinPE\WinPE-3.0.iso C:\WinPE\ISO

As a hint, try your ISO in vmware before burning it to a cd, or use a cdrw :) .

Ciao Ephraim

27.06.2009

Autonumbering of iTunes playlist tracks

Filed under: Misc — Ephraim @ 22:08

So, I needed to rename MANY iTunes tracks to the format of
001
002
003
004
a.s.o.

Started doing 20 tracks per day, I got frustrated to do it after the third day. And as I’m a developer, I tought there must be an easier way to do this.
Wonder what, there is an easier way!!!! :) …. Thanks to AppleScript.

Here it is, just create a custom playlist with name “temp” and you are done, after executing this AppleScript:

tell application "iTunes"
set oldfi to fixed indexing
set fixed indexing to true
repeat with i from 1 to count tracks of playlist "temp"
set aTrack to track i of playlist "temp"
set name of aTrack to (do shell script "printf %.3d " & i)
end repeat
set fixed indexing to oldfi
end tell

Have Fun! Life is to short to do this by hand :P

Ciao Ephraim

21.04.2009

Finally; git via ssh SOCKS proxy on windows

Filed under: Misc — Ephraim @ 08:05

YEAHA!!!

I managed it to get git work via my ssh proxy tunnel … after min. 5 tries in a period of about 1 year, it finally works :) .

Git for Windows:
http://git-scm.com/download

Proxy Connect Command for Windows:
http://bent.latency.net/bent/darcs/goto-san-connect-1.85/src/connect.html

My “proxyCmd.bat” (e.g. put it into c:\program files\Git\bin):

@echo off
set CONNECT=c:\program files\Git\bin\connect.exe
set PROXY=localhost:815

"%CONNECT%" -S %PROXY% %*

So all tools installed. You will need a Putty connection to a server with a dynamic SSH Tunnel connection on port 815.

Now we tell git to use the proxyCmd.bat:

git config core.gitproxy "c:\program files\Git\bin\proxyCmd.bat"

Now git should use the ssh SOCKS Tunnel … don’t forget to open the ssh connection :) .

[EDIT]
If you want to set the git proxy system global, you need to set the environmentvariable GIT_PROXY_COMMAND.
e.g.:

set GIT_PROXY_COMMAND=c:\program files\Git\bin\proxyCmd.bat

[/EDIT]

Ciao Ephraim

05.12.2008

add multiple Spellchecker Languages support to Psi

Filed under: Jabber — Ephraim @ 11:22

Currently Psi supports that the messages you type in, are checked against a spellchecker.
But only for the from the system defined language, even the spellchecker would support more then that language.

So there is a  need (IMHO) for a selection while typing the message, cause the most user of Psi will min. speak two languages (english and the mothertounge).

Here is a alpha implementation of this, it will let you choose the language in the chatdlg. It’s far away from being tested overall, rather than it worked for me in the first view. It is worked out against current devel version of Psi (0.13-dev) from git.

Here is the patch:
multiple_spellchecker_languages_support.tar.gz

And here a image how it should look like if it has compiled successfully, of course with the languages  you have installed on your system ;)
example_multi_lang_spellchecker_lnx.png

The current implementation works only with aspell, which is used on windows and linux. But windows I never tried ;) . Build and quick try, worked for me:
example_multi_lang_spellchecker_win.png

So mac os x (10.5 or later only) is now supported too.
example_multi_lang_spellchecker_mac.png

And the patch which includes everything about multi language support for Psi spellchecker is here:
0001-overall-multiple-language-support-for-spellchecker.patch.zip


Constrains that I know are:

  • the patch only includes ui support for the chatdlg, muc I haven’t done yet.
  • the language combo box needs to recognize language changes / or on startup too,
    so it displays always the correct current language.

Ciao Ephraim

04.11.2008

Make Psi Deb Package

Filed under: Jabber — Ephraim @ 14:40

I always wondered howto create debian packages and always needed psi deb packages, so I just tried to create one package for psi. Two things done by one research :) .

And a step further; create a script which does the job for me. Just give it the source and the destination and it will bring me a psi deb package to my desktop.

For all who want to do this too, here is my script: mkpsideb.tar.gz

The usage is easy, as I said, the source directory and then the configure prefix directory and you are done. If some additional configure options are needed to compile psi on your desk, the third parameter is a direct passthrough to configure.

Example:
psi source is at ~/Desktop/psi-0.13
Script is placed at the Desktop.
so open up a terminal and do the following steps:

cd ~/Desktop
./mkpsideb.sh psi-0.13 /opt/psi-dev/0.13

And then you have a psi debian package right at your desktop.
But please, have a look into the Script before! You should min. change the maintainer setting at the very top variables.

Prerequisite is, that you can at least build psi manually.

ciao Ephraim

28.10.2008

Hello world!

Filed under: Misc — Ephraim @ 11:24

My blog is born. As everyone needs to have a blog today, I decided to create one for me too :) .
I wonder if this was a good idea!

Ciao Ephraim

Powered by WordPress