?

Log in

gaoithe
05 May 2010 @ 11:47 pm





Posted by ShoZu

 
 
gaoithe
18 April 2010 @ 12:00 pm





Posted by ShoZu

 
 
 
gaoithe
11 September 2009 @ 11:05 pm
It was trivial to modify the XQual XStudio launcher for perl to work for tcl (ActiveTcl).
It is working for very simple tcl scripts with ActiveTcl 8.5 (and with modification with 8.4).

Change the perl CLauncherImpl.java thusly:
s/perl/tcl/gi; s/\.pl/\.tcl/g;
Tcl interpreter: C:/Tcl/bin/tclsh85.exe

It implements the same test interface as XStudio perl (and other):
* Test generates log.txt with lines including [Success] or [Failure] or [Log].
* Test is deemed complete when a file test_completed.txt is created.

Note for XQual XStudio:
* tools seems very nice to use, developer good - closed source though ...
* source code for test launchers is provided in XAgent and XStudio dir trees.
* there doesn't seem to be a Developers Guide though it is referred to (there are javadocs)
* a launcher has 4 files (e.g. for tcl) tcl.jar and tcl.xml in launchers/, tcl/CLauncherImpl.java and buildTclLauncher.bat in src/*/ and build/

I've been evaluating using XQual XStudio as a test invoking tool. As opposed to Salome_tmf.
http://www.xqual.com/
http://xqual.freeforums.org/evaluating-test-tools-xqual-xstudio-salome-tmf-t349.html


Files here:
http://www.dspsrv.com/~jamesc/torture/work/tool_xqual_xstudio/

/*
+----------------------------------------------------------------------+
| Class: CLauncher |
| |
| Developer: Eric Gavaldo (egavaldo@xqual.com) |
| Jumbo |
| James Coleman (jamesc@dspsrv.com) |
| |
+----------------------------------------------------------------------+
*/

/*
This file was created by changing the perl CLauncherImpl.java
s/perl/tcl/gi; s/\.pl/\.tcl/g;
It has been tested with ActiveTcl, tcl interpreter: C:/Tcl/bin/tclsh85.exe

It implements the same test interface as XStudio perl (and other).
Test generates log.txt with lines including [Success] or [Failure]
or [Log]. Test is deemed complete when a file test_completed.txt is created.
*/

package com.xqual.xlauncher.tcl;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Vector;

import com.xqual.xagent.launcher.CExecutionStep;
import com.xqual.xagent.launcher.CLauncher;
import com.xqual.xagent.launcher.CParamParsingException;
import com.xqual.xagent.launcher.CReturnStatus;
import com.xqual.xagent.launcher.runner.CRunner;
import com.xqual.xagent.launcher.runner.IRunner;
import com.xqual.xcommon.CAttribute;
import com.xqual.xcommon.IConstantsResults;
import com.xqual.xlauncher.CTimeoutListener;

/**
* The CLauncherImpl implementation of ILauncher for Tcl.
* @author egavaldo & jumbo & jamesc
*/
public class CLauncherImpl extends CLauncher implements IConstantsResults {

// +==============================================================+
// | Attributes |
// +==============================================================+

static final String TRACE_HEADER = "{tcl } ";

// parameters impacting executing at run time set by the test operator
private String testRootPath;
private int timeout = 600;
private String tclInstallPath;
private File tclInterpreter;

private File workingDir;

private static final String TCL_INTERPRETER_EXE = "tclsh85.exe";

// +==============================================================+
// | Constructors |
// +==============================================================+

public CLauncherImpl() {
super(TRACE_HEADER);
}

// +==============================================================+
// | Methods |
// +==============================================================+

public CReturnStatus initialize(int sutId, String sutName, String sutVersion) {
setSutDetails(sutId, sutName, sutVersion);

// check the configuration sent by the manager
printConfiguration();

Vector executionSteps = new Vector();
try {
// retrieve the parameters we need
testRootPath = getStringParamValue("General", "Test root path");
timeout = getIntegerParamValue("General", "Asynchronous timeout (in seconds)");

tclInstallPath = getStringParamValue("Tcl", "Tcl install path");
tclInterpreter = new File(tclInstallPath + "\\" + TCL_INTERPRETER_EXE);
} catch (CParamParsingException e) {
traceln(LOG_PRIORITY_SEVERE, "parsing error during initialization");
executionSteps.add(new CExecutionStep(RESULT_FAILURE, "Exception during initialize: " + e.getMessage()));
return new CReturnStatus(RESULT_FAILURE, executionSteps);
}
return new CReturnStatus(RESULT_SUCCESS, executionSteps);
}

public CReturnStatus preRun(int testId, String testPath, String testName, Vector attributes) {
traceln(LOG_PRIORITY_INFO, "preRun testId=" + testId + " testPath=" + testPath + ":" + testName + "...");
Vector executionSteps = new Vector();
return new CReturnStatus(RESULT_SUCCESS, executionSteps);
}

public CReturnStatus run(int testId, String testPath, String testName, int testcaseIndex) {
traceln(LOG_PRIORITY_INFO, "run testId=" + testId + " testPath=" + testRootPath + "/" + testPath + "/" + testName + " testcaseIndex=" + testcaseIndex + "...");
Vector executionSteps = new Vector();

String scriptParentFolderPath = testRootPath + "/" + testPath + "/";
workingDir = new File(scriptParentFolderPath);

// +------------------------------------+
// | Interpret the script
// +------------------------------------+
CRunner tclRunner = new CRunner("[" + testId + "] "+ testPath + ":" + testName + "." + testcaseIndex,
tclInterpreter.toString() + " " + testRootPath + "/" + testPath + "/" + testName + ".tcl " +
"/debug " +
"/testcaseIndex=" + testcaseIndex,
workingDir);
short result = tclRunner.requestAction(IRunner.START_PROCESS, IRunner.DO_NOT_WAIT_END_OF_EXECUTION);
if (result == RESULT_FAILURE) {
executionSteps.add(new CExecutionStep(RESULT_FAILURE, "script interpretation failed"));
return new CReturnStatus(RESULT_FAILURE, executionSteps);
}

// to check if the execution completed correctly, we need to check if the "test_completed.txt" has been created
short resultTimeout = CTimeoutListener.waitForFile(new File(workingDir + "/test_completed.txt"), timeout);
if (resultTimeout != RESULT_SUCCESS) {
executionSteps.add(new CExecutionStep(RESULT_SUCCESS, "timeout of " + timeout + " seconds to execute the test case expired"));
return new CReturnStatus(RESULT_FAILURE, executionSteps);
}

return parseResultFile(executionSteps);
}

public CReturnStatus postRun(int testId, String testPath, String testName) {
traceln(LOG_PRIORITY_INFO, "postRun testId=" + testId + " testPath=" + testPath + ":" + testName + "...");
Vector executionSteps = new Vector();
executionSteps.add(new CExecutionStep(RESULT_SUCCESS, "postRun: succeeded"));
return new CReturnStatus(RESULT_SUCCESS, null);
}

public CReturnStatus terminate() {
Vector executionSteps = new Vector();
executionSteps.add(new CExecutionStep(RESULT_SUCCESS, "Terminate"));
return new CReturnStatus(RESULT_SUCCESS, executionSteps);
}

// +--------------------------+
// ¦ Utilities ¦
// +--------------------------+

private CReturnStatus parseResultFile(Vector executionSteps) {
// parse the result file to get the result and the execution steps
File resultFile = new File(workingDir + "/log.txt");
if (!resultFile.exists()) {
traceln(LOG_PRIORITY_SEVERE, "Result file not found!");
executionSteps.add(new CExecutionStep(RESULT_FAILURE, "run: result file not found!"));
return new CReturnStatus(RESULT_FAILURE, executionSteps);
} else {
executionSteps.add(new CExecutionStep(RESULT_SUCCESS, "run: result file found"));
}

String line, message;
boolean errorDetected = false;

try {
FileInputStream fileInputStream = new FileInputStream(resultFile);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));

while ((line = bufferedReader.readLine()) != null) {
line = line.trim();
System.out.println(">" + line);
if (line.indexOf("[Success]")>=0) {
message = line.substring(10, line.length()); // [Success] length = 9
executionSteps.add(new CExecutionStep(RESULT_SUCCESS, message));

} else if (line.indexOf("[Failure]")>=0) {
message = line.substring(10, line.length());
executionSteps.add(new CExecutionStep(RESULT_FAILURE, message));
errorDetected = true;

} else if (line.indexOf("[Log]")>=0) {
message = line.substring(6, line.length());
executionSteps.add(new CExecutionStep(RESULT_UNKNOWN, message));

} else {
//traceln(LOG_PRIORITY_SEVERE, "unknown tag!");
}
}

} catch (Exception e) {
traceln(LOG_PRIORITY_SEVERE, "exception whle parsing the result file: " + e);
executionSteps.add(new CExecutionStep(RESULT_FAILURE, "Exception whle parsing the result file: " + e));
errorDetected = true;
}

if (errorDetected) {
return new CReturnStatus(RESULT_FAILURE, executionSteps);
} else {
return new CReturnStatus(RESULT_SUCCESS, executionSteps);
}
}
}
Tags: , ,
 
 
gaoithe
03 September 2009 @ 12:44 am
Let's all sing the "let's automate" song!

Incidentally started new job with Intune http://www.intunenetworks.com Monday.
Finished with Sun http://www.sun.com Friday!
Kids all started back to school Tue.

script created just now: bt-sync-mobile.sh

TODO: cron job to daily sync phone

#!/bin/bash

#INVOCATION:
#$ bt-sync-mobile.sh [device [dir]]
#$ bt-sync-mobile.sh Pooky 'C:\Data\Images\' 2>&1 |tee .btsync/bt_sync_images.log 
#Stuff is synched to ~/.btsync/`echo $dir |sed 's/[\/ \\"]/_/g'`
#wami*.gpx and *.jpg files are cleared off device if synced successfully
#
#REQUIREMENTS: 
#linux with bluetooth hardware
#various bluetooth linux utils, these ubuntu packages:
#bluez bluez-utils(?) obexftp openobex-apps
#
# some of these come by default, and some are not needed, but this is on the system the script was tested on
#$ dpkg -l |egrep "bluez|hci|obex" |sed 's/  */ /g'
#ii bluez 4.32-0ubuntu4.1 Bluetooth tools and daemons
#ii bluez-alsa 4.32-0ubuntu4.1 Bluetooth audio support
#ii bluez-cups 4.32-0ubuntu4.1 Bluetooth printer driver for CUPS
#ii bluez-gnome 1.8-0ubuntu5 Bluetooth utilities for GNOME
#ii bluez-gstreamer 4.32-0ubuntu4.1 Bluetooth gstreamer support
#ii bluez-utils 4.32-0ubuntu4.1 Transitional package
#ii gnome-vfs-obexftp 0.4-1build1 GNOME VFS module for OBEX FTP
#ii libopenobex1 1.5-1 OBEX protocol library
#ii libopenobex1-dev 1.5-1 OBEX protocol library - development files
#ii obex-data-server 0.4.4-0ubuntu1 D-Bus service for OBEX client and server sid
#ii obexftp 0.19-7ubuntu2 file transfer utility for devices that use t
#ii openobex-apps 1.5-1 Applications for OpenOBEX
#ii python-bluez 0.16-1ubuntu1 Python wrappers around BlueZ for rapid bluet
#
#NOTES:
#The bluetooth connect seems to fail sometimes.
#Files with funny chars in name could cause a problem. maybe. () are okay
#Files to clear out are hardcoded.
#It's simple - just syncs files up if they don't exist on host.
#There are various other TODOs

DEVICENAME=$1
#echo all is $*
BTSYNCHOME=~/.btsync

# DEVICENAME can be blank (scans all devices)
HCISCAN=`hcitool scan |grep "$DEVICENAME" |grep -v ^Scanning `
#Scanning ...
#	00:1F:5D:BF:29:39	Nokia 3120 mmfa
#	00:17:E5:EE:29:18	Pooky
#check for duplicates
DEVCOUNT=`echo "$HCISCAN" |wc -l`
HCISCAN_S=`echo "$HCISCAN" |sed 's/[\t ][\t ]*/ /g;s/^ *//;'`
BTADDR=`echo "$HCISCAN_S" |cut -d' ' -f1`
DEVNAME=`echo "$HCISCAN_S" |cut -d' ' -f2-`

#echo "DEVCOUNT=$DEVCOUNT HCISCAN=$HCISCAN 
#BTADDR=$BTADDR DEVNAME=$DEVNAME"

if [[ $DEVCOUNT -ne 1 ]] ; then
    echo "usage: $0   
  e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
Which device?
$HCISCAN
"
    exit;
fi

echo "BTADDR=$BTADDR DEVNAME=$DEVNAME"
#sudo hcitool info $BTADDR

DIRTOSYNC=$2
# TODO pass in dir/file to sync on cmd line in $2
if [[ -z $DIRTOSYNC ]] ; then
    echo "usage: $0   
  e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
  e.g. $0 \$BTADDR \"C:/Data/Images/\"
  e.g. $0 $BTADDR \"C:/Data/Videos/\"
  e.g. $0 42:54:41:44:44:52 \"C:/Data/Sounds/\"
"
    DIRTOSYNC="C:/Data/"
    #exit;
fi

mkdir -p $BTSYNCHOME

DIRTOSYNC_HASH=`echo "$DIRTOSYNC" |sed 's/[\/ \\"]/_/g'`
#obexftp -b $BTADDR -v -l ""
#obexftp -b $BTADDR -v -l "C:/"
echo DIRTOSYNC=$DIRTOSYNC DIRTOSYNC_HASH=$DIRTOSYNC_HASH
obexftp -b $BTADDR -v -l "$DIRTOSYNC" |tee $BTSYNCHOME/$DIRTOSYNC_HASH.list


# cd to where we are getting files
mkdir -p $BTSYNCHOME/$DIRTOSYNC_HASH
cd /tmp
cd  $BTSYNCHOME/$DIRTOSYNC_HASH
pwd


echo get list of all files
echo TODO: parse xml safely/properly
# 
#  
FILES=`grep "
[Error: Irreparable invalid markup ('<file [...] newer/different>') in entry. Owner must fix manually. Raw contents below.]

Let's all sing the "let's automate" song!

Incidentally started new job with Intune http://www.intunenetworks.com Monday.
Finished with Sun http://www.sun.com Friday!
Kids all started back to school Tue.

script created just now: bt-sync-mobile.sh

TODO: cron job to daily sync phone

<pre>
#!/bin/bash

#INVOCATION:
#$ bt-sync-mobile.sh [device [dir]]
#$ bt-sync-mobile.sh Pooky 'C:\Data\Images\' 2>&1 |tee .btsync/bt_sync_images.log
#Stuff is synched to ~/.btsync/`echo $dir |sed 's/[\/ \\"]/_/g'`
#wami*.gpx and *.jpg files are cleared off device if synced successfully
#
#REQUIREMENTS:
#linux with bluetooth hardware
#various bluetooth linux utils, these ubuntu packages:
#bluez bluez-utils(?) obexftp openobex-apps
#
# some of these come by default, and some are not needed, but this is on the system the script was tested on
#$ dpkg -l |egrep "bluez|hci|obex" |sed 's/ */ /g'
#ii bluez 4.32-0ubuntu4.1 Bluetooth tools and daemons
#ii bluez-alsa 4.32-0ubuntu4.1 Bluetooth audio support
#ii bluez-cups 4.32-0ubuntu4.1 Bluetooth printer driver for CUPS
#ii bluez-gnome 1.8-0ubuntu5 Bluetooth utilities for GNOME
#ii bluez-gstreamer 4.32-0ubuntu4.1 Bluetooth gstreamer support
#ii bluez-utils 4.32-0ubuntu4.1 Transitional package
#ii gnome-vfs-obexftp 0.4-1build1 GNOME VFS module for OBEX FTP
#ii libopenobex1 1.5-1 OBEX protocol library
#ii libopenobex1-dev 1.5-1 OBEX protocol library - development files
#ii obex-data-server 0.4.4-0ubuntu1 D-Bus service for OBEX client and server sid
#ii obexftp 0.19-7ubuntu2 file transfer utility for devices that use t
#ii openobex-apps 1.5-1 Applications for OpenOBEX
#ii python-bluez 0.16-1ubuntu1 Python wrappers around BlueZ for rapid bluet
#
#NOTES:
#The bluetooth connect seems to fail sometimes.
#Files with funny chars in name could cause a problem. maybe. () are okay
#Files to clear out are hardcoded.
#It's simple - just syncs files up if they don't exist on host.
#There are various other TODOs

DEVICENAME=$1
#echo all is $*
BTSYNCHOME=~/.btsync

# DEVICENAME can be blank (scans all devices)
HCISCAN=`hcitool scan |grep "$DEVICENAME" |grep -v ^Scanning `
#Scanning ...
# 00:1F:5D:BF:29:39 Nokia 3120 mmfa
# 00:17:E5:EE:29:18 Pooky
#check for duplicates
DEVCOUNT=`echo "$HCISCAN" |wc -l`
HCISCAN_S=`echo "$HCISCAN" |sed 's/[\t ][\t ]*/ /g;s/^ *//;'`
BTADDR=`echo "$HCISCAN_S" |cut -d' ' -f1`
DEVNAME=`echo "$HCISCAN_S" |cut -d' ' -f2-`

#echo "DEVCOUNT=$DEVCOUNT HCISCAN=$HCISCAN
#BTADDR=$BTADDR DEVNAME=$DEVNAME"

if [[ $DEVCOUNT -ne 1 ]] ; then
echo "usage: $0 <devicename> <dir_to_sync>
e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
Which device?
$HCISCAN
"
exit;
fi

echo "BTADDR=$BTADDR DEVNAME=$DEVNAME"
#sudo hcitool info $BTADDR

DIRTOSYNC=$2
# TODO pass in dir/file to sync on cmd line in $2
if [[ -z $DIRTOSYNC ]] ; then
echo "usage: $0 <devicename> <dir_to_sync>
e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
e.g. $0 \$BTADDR \"C:/Data/Images/\"
e.g. $0 $BTADDR \"C:/Data/Videos/\"
e.g. $0 42:54:41:44:44:52 \"C:/Data/Sounds/\"
"
DIRTOSYNC="C:/Data/"
#exit;
fi

mkdir -p $BTSYNCHOME

DIRTOSYNC_HASH=`echo "$DIRTOSYNC" |sed 's/[\/ \\"]/_/g'`
#obexftp -b $BTADDR -v -l ""
#obexftp -b $BTADDR -v -l "C:/"
echo DIRTOSYNC=$DIRTOSYNC DIRTOSYNC_HASH=$DIRTOSYNC_HASH
obexftp -b $BTADDR -v -l "$DIRTOSYNC" |tee $BTSYNCHOME/$DIRTOSYNC_HASH.list


# cd to where we are getting files
mkdir -p $BTSYNCHOME/$DIRTOSYNC_HASH
cd /tmp
cd $BTSYNCHOME/$DIRTOSYNC_HASH
pwd


echo get list of all files
echo TODO: parse xml safely/properly
# <folder name="whereami" modified="20080825T144716Z" user-perm="RWD" mem-type="DEV"/>
# <file name="CapsOff.sisx" size="25568" modified="20080331T131250Z" user-perm="RWD"/>
FILES=`grep "<file name=" $BTSYNCHOME/$DIRTOSYNC_HASH.list |cut -d'"' -f2 `
echo FILES=$FILES

## forget about first retrieve or not, just check files on each system
#if [[ -f $BTSYNCHOME/$DIRTOSYNC_HASH.success ]] ; then
#echo for second/.. retrieve just get differences

echo TODO: recurse into directories

echo TODO get updated files, now we get new files only


function wipe_existing_files_from_list () {
echo for now we check if file exists already and wipe from list
##file list to retrieve by eliminating ones already retrieved
FILESTOGET=
for F in $FILES ; do
if [[ ! -f $F ]] ; then
FILESTOGET="$FILESTOGET $F"
fi
done
FILES="$FILESTOGET"
#diff $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
#mv $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
}

function get_the_files () {
if [[ ! -z $FILES ]] ; then
echo get the files
obexftp -b $BTADDR -v -c "$DIRTOSYNC" -g $FILES |tee $BTSYNCHOME/$DIRTOSYNC_HASH.get
# can obexftp do a dir? would be handy.
#obexftp -b $BTADDR -v -g "$DIRTOSYNC" |tee $BTSYNCHOME/$DIRTOSYNC_HASH.getdir
# also -G (get and delete) could be used for some files
fi
}



# TODO/half DONE track and check each file seperately
# TODO maybe if we got the file, store the associated line then in .success file
# use size/date in xml and on file system.
# ideally we want commands: GET[and remove] if newer/different

function track_the_files () {
#CHECKFILES=`echo $FILES |sed 's/ / && -f /g'`
#if [[ $CHECKFILES ]] ; then
# mv $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
for F in $FILES ; do
if [[ -f $F ]] ; then
# a file name which is part of others will cause problems
FILEINFO=`grep "<file name=" $BTSYNCHOME/$DIRTOSYNC_HASH.list |grep $F`
echo "$FILEINFO" >> $BTSYNCHOME/$DIRTOSYNC_HASH.success
fi
done
}


## TODO cleanup all files on mobile retrieved this time or previous
## allows syncing as soon as possible but cleaning after longer (keep recent photos, traces, ...)

# cleanup files matching certain patterns on mobile if they were successfully retrieved
# we could use -G earlier (get and delete)
function clean_the_files () {
for F in $FILES ; do
###if [[ -f bin/eirkey.pl && ( -n ${FG#wami} || -n ${F%gpx} ) ]] ; then echo yep; fi

if [[ -f $F && ( -n ${F#wami*.gpx} || -n ${F#*.jpg} ) ]] ; then
obexftp -b $BTADDR -v -c "$DIRTOSYNC" -k $F |tee -a $BTSYNCHOME/$DIRTOSYNC_HASH.clean
fi
done
}

wipe_existing_files_from_list
echo files to get FILES=$FILES

get_the_files

track_the_files

clean_the_files
</pre>
 
 
 
gaoithe
21 August 2009 @ 11:35 pm
TODO: dates a bit approximate

books
20/8/2009

ByRoyalCommand
author:CharlieHigson
More of Daire's books.

1/8/2009

Ilium
author:DanSimmons
Excellent!
Gods and Illiad and sci-fi ... i was a bit dubious but wow!
Nice book :)

17/8/2009

StarOfTheSea
author:JosephOConnor
good
however the excited gushing quotes on cover are off-putting

20/6/2009

TheSeaAndTheSummer
author:GeorgeTurner
mmmh

desk
21/8/2009


Nearly a christmas tree ornament!
Another flash moment.
Missing 0 from length in a command in manual and blindly cut&pasting. tut.
Tags: , ,
 
 
gaoithe
This error ("line 1: syntax error: word unexpected (expecting ")")") is misleading.
It leads one initially to suspect a scripting error.
It is because of trying to run an incompatible (maybe elf64) binary on an elf32 platform (x86/i386).
 /sbin/udevd: line 1: syntax error: word unexpected (expecting ")")


It is quite like the misleading error you get in solaris 32bit or 64bit "Invalid argument" if trying to run an incompatible binary.

The error on x86_64 is good "cannot execute binary file" leads you to the problem directly.
$ ./hello32sparc 
bash: ./hello32sparc: cannot execute binary file
$ ./hello64sparc 
bash: ./hello64sparc: cannot execute binary file
$ ./hexdump_arm 
bash: ./hexdump_arm: cannot execute binary file
$ uname -s -r -m -p -i -o
Linux 2.6.27.29-170.2.79.fc10.x86_64 x86_64 x86_64 x86_64 GNU/Linux


$ ./hexdump
-bash: ./hexdump: Invalid argument
$ ./hexdump_arm 
-bash: ./hexdump_arm: Invalid argument
$ ./hexdump
hexdump        hexdump_arm    hexdumpx86_32  hexdumpx86_64  
$ ./hexdumpx86_32 
-bash: ./hexdumpx86_32: Invalid argument
$ ./hexdumpx86_64 
-bash: ./hexdumpx86_64: Invalid argument
$ uname -s -r -m -p -i
SunOS 5.10 sun4u sparc SUNW,Sun-Fire-V245


Use objdump to check what platform your binaries are for.
objdump -h hello32sparc 
elfdump -e hello32sparc 
 
 
gaoithe
Problem:
$ unzip -l muh.zip
$ unzip -Ppassword muh.zip
Archive: muh.zip
   skipping: muh unsupported compression method 99

Solution: On linux p7zip will unzip the zip with the password, for fedora:
sudo yum install p7zip
7za x -Ppassword muh.zip

This will hopefully save me 2 minutes of fumbling next time (BY lodging this info into my brain as well as on the internet).

$ rpm -qa |grep p7zip
p7zip-4.61-1.fc10.x86_64
$ rpm -q p7zip-4.61-1.fc10.x86_64 -l
/usr/bin/7za

7-Zip (A) 4.61 beta  Copyright (c) 1999-2008 Igor Pavlov  2008-11-23


 
 
gaoithe
; open file (path and file at cursor) and bounce back to original buffer next line
; handy for restoring sessions or opening list of interesting files
; it's obvious here I'm repeating myself somewhat
; easier creating a quick macro each time sometimes than reading docs and trying to find the one-and-only proper way of the probably few ways of doing something
(fset 'open-this-file2
   [?\C-  ?\C-e escape ?w ?\C-x ?\C-f ?\C-  left left left left left left left left left left left left left left left left left left left left left left left left left left ?\C-a ?\C-y ?\C-k return ?\C-x ?b return ?\C-a down])

(fset 'load-file-at-cursor
   [?\C-  ?\C-e escape ?w ?\C-a ?\C-x ?\C-f ?\C-a ?\C-y ?\C-k return ?\C-x ?b return down])

(fset 'open-this-file
   [?\C-  ?\C-e escape ?w ?\C-a down ?\C-x ?\C-f ?\C-a ?\C-y ?\C-k return ?\C-x ?b return])


I used to carry a massive .emacs file around everywhere, now-a-days I just put in the minimum:
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(c-basic-offset 4)
 '(c-default-style (quote ((java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
 '(indent-tabs-mode nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )
 
 
gaoithe
;ECB = Emacs Code Browser
;Sometimes there are too many source code files, directories and lines.
;ECB turns emacs into a more friendly source code editor/browser.
;Emacs is zippy and lightweight and stable when compated with Eclipse/Netbeans/Visual Studio
;The install doc is slightly scary however the install is really easy.
; there's just one easy to install dependancy which is CEDET (= Collection of Emacs Development Environment Tools)
;http://ecb.sourceforge.net/
;http://www.emacswiki.org/emacs/EmacsCodeBrowser
;http://cedet.sourceforge.net/
;http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html

; get cedet, unpack it (I'm working in ~/src) and build it with `make`
; http://sourceforge.net/projects/cedet/files/cedet/1.0pre6/cedet-1.0pre6.tar.gz/download
; add settings in your .emacs (see below)
; get ecb, unpack it
; http://sourceforge.net/projects/ecb/files/ecb/ECB%202.40/ecb-2.40.tar.gz/download
; add settings in your .emacs (see below): add to load-path and (require 'ecb)
; restart emacs
; you may be prompted to confirm some initialisation actions
; in emacs: tools -> Start Code Browser ECB

(load-file "~/src/cedet-1.0pre6/common/cedet.el")
(global-ede-mode 1)                      ; Enable the Project management system
(semantic-load-enable-code-helpers)      ; Enable prototype help and smart completion
(global-srecode-minor-mode 1)            ; Enable template insertion menu


(add-to-list 'load-path
             "~/src/ecb-2.40")
(require 'ecb)
;(require 'ecb-autoloads)



;; screenshots
; Code editing windows
; File and dir list, file source control status shown.
; Code method/symbol semantic view.
; http://www.dspsrv.com/~jamesc/torture/Screenshot-emacs-ECB-sun_jmf_gstreamer.png
; http://www.dspsrv.com/~jamesc/torture/Screenshot-emacs-ECB-whereami-symbian.png

fedora 10 Sun embedded Java media:


ubuntu jaunty whereami symbian: