I’m now with Atensis

After a good four years with Exait AB I have decided to move on. From today I work with Atensis AB.

Make your airport connected printer work with apples new (but crippled) Airprint

First read this article about what files to download and add to your system.

You are all set from here, I just couldn’t find how to use it on my iOS4.2 devices but it seems that the application must support it. Mail is one of the apps that supports airprint and it shows up when you choose to forward an email.

Now I just need to figure out how to share the scanner functionality via airport express.

New bike!

I finally bought a new bike. A Kona Dr Dew. I love it so far!

Jag köper en ny cykel inom en vecka!

Jag trodde jag ville ha en Kona Dew Deluxe, sen pratade Stöckel om c-dale badboy 700. Jag matchade enkelt med kona Dr Dew. Men nu är jag villrådig. Ibland läser man att skivbromsar pajar ekrar. återkommer i ämnet, har ni synpunkter så posta gärna i Mitt nya kommentarsystem. (written on my ipad with chardonay influence)

I wrote a lightroom plugin for uploading images to Tumblr

I’ve been wanting an Adobe Lightroom plugin that exports directly to Tumblr just as the flickr-plugin does but couldn’t find any. So I wrote up one myself. It’s very basic but should do what’s needed. Feel free to comment, request features or hail me if you want.

DOWNLOAD LIGHTROOM TUMBLR EXPORT PLUGIN

UPDATE1 : There’s an advanced plugin located here. See comments below for more details. I love the open-source way to do things!

UPDATE2: Another version: http://beret.tumblr.com/post/9251247804/i-expect-this-to-be-useed-by-hipsters-and-tiff

UPDATE3: Check out Nathans cool addons in the comment below or go direct and download: http://dl.dropbox.com/u/2274134/tumblr-2.lrplugin.zip

UPDATE4: Tumblr has changed their API so the plugin is broken. If anyone makes this work, please let us all know.

UPDATE5: My open source project failed (and that’s okay). I haven’t checked this product out, but according to the source they needed to do a whole re-write and they need some money back, so please, take a look on this: http://www.alexfreund.com/lightroom-plugin it will most probably make your world rock! ;-)


Propaganda to keep my blog running:

Merry Christmas from us

Gingerbread season 2009: Theme Sci-Fi

The tradition continues, this year focus was on Sci-Fi:

Ohh, there’s a new domino designer in town.

I used to try out the latest designer first of all, but then they compiled R702 on my birthday (26h sep) and I thought that was a sign for me to settle down.

Anyway, as being a true professional I think it could be in my interest to keep up with the latest stuff so I installed Domino designer 8.5.1 today (skiping everything from the good ol’ 702 relase and forward) and got me a fancy-pancy Eclipse environment. Very appreciated!

Then I found out that I need to change file to save in the right hierarchy which is very annoying. Or save twice which is not necessary, if you save on scriptlibrary level all classes in the library will be saved.

Later on again I found that the source-files are not ‘bundled’ with the agent, so the stacktrace gives no help at all.

Google came to rescue and this post over at codestore got me moving on.

Best thing is really “There is a checkbox “Compile Java code with debugging information” on the properties pane of java agents and script libraries.”. Guess how long time it took me to find that proppane!!! I mean, domino is well known for having code and propertises stuttered all over the project; that really didn’t got better with eclipse.

But everything is forgiven because Eclipse is a hell of a nice editor.

Enjoy the new regim, the eclipse regim!

GTUG STHLM

Yesterday it was a GTUG meeting on Stockholm. GTUG is the acronym for Google Technology User Group and is not affiliated with Google in any more way that that the users are interested in the technology that Google provides.

Yesterday was my first meeting and the only reason I ever knew that there was such a thing as GTUG was that Peter Svensson (@psvensson) was at an earlier GeekMeet and sponsored with some beer. An excellent attitude that ofcourse made me curious, and some googling and linkedining later we were in contact.

This was the third GTUG in stockholm and I believe we where around 40 persons or so, the second meeting was attended by 90 heads and I don’t even want to think of how many of those that had no clue what was going on at the screen because it was rather crowded already at 40 visitors. Not to mention the bad seatings!

The bad seating was compensated by really interesting speakers. We got an in-the-middle-of-dev perspective of a cool app that will make the android device a complete MIDI-controler and some technical implications for that, for example, it’s not possible to set-up an adhoc wifi between computer and phone or that the bluetooth lacked a decent API.

After that presentation we was shown a rather fancy idea regarding augmented reality. This is a topic that is starting to get ahead of the sci-fi scene and I’m soo thrilled to be in the middle of it. Poor our parents that only got the transistor, the TV and the internet. :)

So far there was a total absence of real code so my back started to itching like hell because of the bad chairs, but we got saved by a demonstration of Dojo gfx (or whatever the package is called). Very fancy stuff could be done with pure javascript and if I got it right the Dojo toolkit will use the best way to render the graphic depending on the browser. It even renders as vectors when applicable.

I remember I did a comparison between Ext and Dojo three or four years ago. Ext won because the documentation was better (ie. it existed). According to information I recieved yesterday the Dojo documentation is running up fast these days.

It’s very much mentionable that the GTUG will set of a Android Hackathon in the very near future. It’s on a saturday and I think everyone with an interest in developing on the Android plattform will get a huge jumpstart by visiting.

I wrote a jQuery plugin that could help domino developers: jQuery.plugin.deleteable.js

In my current project we have a few web-pages that contains meta-data around clients, projects or companies. Each page contains different modules and one module that was repeatedly used was a table that lists attachments that was connected to the current page.

When everything was working I could simply do this in a document.ready to get everything in place:

1
$('#docFileTable').deleteable();

I wanted to have a solution that could be implemented all over the site without needing to rebuild every form. I came up with a jQuery plugin that makes the document represented in the table deleteable. I was able to do this with just one modification in the view that generates the markup for the table, I added an attribute to the TR cell: docunid and added an empty TD in the beginning of a row. The latter was due to a performance issue with IE6 when I tried to add this TD dynamically.

The rendered table looks like this (I have removed the anchor links for simplicity):

1
2
3
4
5
6
7
8
9
10
11
<table border="0" width="100%">
<tbody>
<tr>
<td class="rowControl"></td>
<td><a onclick="openPopup('/mydb.nsf/0/9D147753FCFAA1FCC125764C0067CADB/$file/jocke_jordglob.jpg?open');" href="#">jocke_jordglob.jpg</a></td>
</tr>
<tr>
<td class="rowControl"></td>
<td><a onclick="openPopup('/mydb.nsf/0/7A990FCEC0C4A468C125764C0067CAD6/$file/jocke_cigar.jpg?open');" href="#">jocke_cigar.jpg</a></td>
</tr>
</tbody></table>

Before we can delete anything we need to have something in the backend that deletes the document, an AjaxDocDeleter. It can be a simple agent:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Sub Initialize
On Error Goto errHandler
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument

Set db=session.CurrentDatabase
Set curdoc=session.DocumentContext

'Print "
"
docunid=Strleft(Strright(curdoc.query_string(0)+"
&amp;","docunid="),"&amp;")
Set doc=db.GetDocumentByUNID(docunid)
Call doc.Remove(True)

Print "
Content-Type:text/javascript"
Print "
result : 'OK';"
Exit Sub
End Sub

So, now we have a nice table and a back-end solution, let’s do a jQuery plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
jQuery.fn.deleteable = function() {
this.each(function(){
$('TR', this).each(function() {
var o ={
element : $(this)
,docUnid : $(this).attr('docunid')
};
td = $(':first',$(this));
link = $('<a href="#"> </a>').attr({'class':'deleteLinkNoACL', title:'Delete document...'}).click(function(){
elm = $(this);
if(confirm('Are you really sure?')) {
elm.addClass('loadAjax');
elm.removeClass('deleteAble');
ajaxParams = {
url : '/'+dbpath+'/DeleteDoc?OpenAgent&amp;docunid='+o.docUnid
,success: function(data) {
// if there's an error in data something went wrong
elm.removeClass('loadAjax');
elm.removeClass('deleteAble');

if(data.indexOf('ERROR')&gt;-1) {
elm.removeClass('deleteLinkNoACL').unbind('click');
elm.css({'padding-left':'20px','background':'url(../famfamfam/error.gif) no-repeat'});
alert('Something went bad, unfortunately we at the development team didn't put enough effort to solve this problem');

} else {
elm.removeClass('
loadAjax');

o.element.hide();
}
}
}
$.ajax(ajaxParams);
}
return false;
});
td.prepend(link);
});
});
}

As we can see there’s a piece of CSS involved with this, and a few icons from the famfamfam library, the CSS used are these classes:

1
2
3
4
5
6
7
8
9
10
11
12
13
TD.deleteAble {

padding-left: 20px;
background: url('../famfamfam/delete.gif') no-repeat;
}
.deleteLinkNoACL {

background: url(../famfamfam/delete.gif) no-repeat;
padding-left:20px;
}
.loadAjax {
background: url(../ajax-loader-small.gif) no-repeat;
}

I haven’t assembled down this in a public package yet, but if enough people are interested I will do that. Just let know.

←Older