Wednesday, August 28, 2013

Convert PST to MBOX


Importing from outlook to apple mail not difficult at all, at your mac os terminal:

1) install libpst (macports required)
sudo port install libpst

2) convert the pst
readpst -o <output directory> <my pst file>.pst

3) Import
At apple mail: File > Import mailboxes > Files in mbox format

thats all

Thursday, May 3, 2012

telnet: sending a mail with smtp

How to test SMTP using telnet, just like this:

$telnet <smtpserver> 25
ehlo
mail from: <source mail>
rcpt to: <target mail>
data
<all content you want>
.
quit

Monday, April 30, 2012

How to execute ssh command and stay logged in

After using implicit authentication a new challenge came, how to exec a command and stay logged in. just like this:

ssh -t <user>@<host> "ls -l; bash -login"

Thursday, April 26, 2012

look for a class on a bunch of jars...

Challenge: how to find a class inside a lot of jars which are inside an unknown directory hierarchy.
Answer: bash scripting

find . -name "*.jar" -exec jar tvf '{}' \; -print | grep -e "<classname>.class" -e "\./"


Wednesday, April 25, 2012

WCF JSON & SOAP Servce

Exposing services to mobile devices has some challenges, first JSON is efficient reason why iOS and Android make it them standard but SOAP is "the standard" and have a well defined contract. So we do not have to choose... we can have both using WCF.

Ill try to keep this simple, what we need to do is publish one WCF with two endpoints, one for JSON and one for SOAP, so this the solution:

Wednesday, July 18, 2007

About quering solved

Two months ago i write about real quering, trying to solve 3 issues in a single store procedure for SqlServer 2005: Dinamic criteria, dinamic paging and dinamic ordering. The solution i give last time doesnt contemplate using ordering, but i finally got it. I really dont know why no one have published something like this, cause i spend some hours around internet, in fact it makes me think i havent seen something, but from my point of view it works well.

Why i bother spending some time looking for this answer, if some post show the easy solution: generate the sentence dinamically inside the procedure, well... two smasing reasons... security and speed. And if you think, what others reasons do you have to make store procedures?, maybe none. So if you make the sentence dinamically you have to give permissions to the tables... no good, and therefore you lose speed cause SqlServer have compile the sentence each time it excecute... no good again.

Thursday, July 12, 2007

Against the curve

Days ago, i begin to be interested in learn more about riding my GS500, i really dont want to become a pilot but i like to learn some techniques to be more safe or to be prepared to the issues of the road. There are two things i learn, i use, and i like to highlight in this post: motor brake and lie down to the curves.

Motor brake, is the dificult way to brake but is really useful in most of cases, it means that when you are going to brake dont use the back brake, instead you down a gear making your engine increase revs wich without accelerating become a brake. But why?, well first you dont use your brakes so it doesnt get heat (simple), and second at the end of brake your engine is in high revs so you have all the power of your bike wich always are in high revs.