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.

Thursday, June 14, 2007

Mobility Touchdown

Today the last day coursing mobility touchdown in Bogota (Colombia), a short travel by learning so much. This ocation a course where i dont feel like a child learning how to put buttons in a form, instead understanding some real problematics of a real mobility world, and discovering ways to do things that i didnt realise exist.

I think it worth the travel, maybe its a little shorter but i can get so many ideas to improve frameworks in my company, specially with use of mobile application blocks wich i saw a first time a little complex but with a little gidance like this i see how useful it become.

Thursday, May 31, 2007

A piece of UIP

Nowadays, I in fact deal with web applications, i have the opportunity to construct several and i learn some things about how you do things.

First i read about layers, and specially presentation layer, wich is the most expensive layer. Where you have to fight with HTML and if you have good luck with ASP.NET, an event oriented implementation that will be adopted by the other technologies soon or later, so dont worry. There is a special thing wich is called "the state", the only place confortable to store data wich you have to decide to store in a server state, or database or in memory, or wherever... and works ok.

There is a sublayer of the presentation layer, that is not commonly used "User Interface Process" or UIP, in this layer you have process objects for two things: 1) orchestate flow of pages, to avoid burn redirects in web pages and 2) handle state of the process, in order to mantain data about the currently process (supported in session of course). You can think about a process as a set of pages to do a task, and a UIP object to support transition of pages and a temporal data store.