PancakesCon 2022 CTF, a write up

The PancakesCon 2022 CTF happened on January 16 2022 (writing that down just so I keep track of this stuff in the old pre-covid calendar way), and our awesome SpaceCows team led by the wonderful apiratemoo got second place! Well, tied to second place, but given how many CTF noobs we were, haha that’s a feat! This was my first time doing a CTF, and I was definitely [insert pic of dog with no clue here].

TlsException on Mono

For reference, if you’re using Mono and trying to use HttpWebRequest and friends to make a connection with a client certificate and you get an exception, it’s because you don’t have any trusted root certificates in the Mono certificate store (even if you are bypassing server certificate validation using the old trick of having a Validation handler returning true). You can fix this by doing sudo mozroots --import --machine --sync

Cross-compiling C++11 without going mad(der)

C++11 is all the rage these days. It’s got a ton of new features language- and compiler-wise that are aimed towards fixing the many problems that have constantly plagued C++ over the years. It’s not a perfect language, not by a long shot, it’s ridiculously verbose when following best practices and it’s, well, C++. I’m sure I’ll get flamed. C++11 support So how do I cross-compile? * [Setup](#setup) Android iOS

Codebits 2014 - 3 days of fun

Wherein I spend three days demo’ing the Oculus Rift, hacking on a portable VR rig with a Raspberry Pi, riding RiftCycles, and mobilizing the entire medical emergency and firemen staff on call due to an extremely nuclear chili experience (rumours of my demise were greatly exagerated).

Formatting git patches for partially transplanting a repository

So I wanted to move a subdirectory inside a git repository into its own repo, keeping all the history of the changes in the original repository in the new one. With git, copying partial history around is as easy as using git format-patch --root -o directory/to/put/patches/in -- path/to/subdirectory, which will create a numbered patch file for every commit that touched the subdirectory in question. Applying all the patches in the new repository is just a questions of doing git am -3 *.

Gnome Developer Experience Hackfest 2013

The Aftermath After finally getting rid of a really bad cold, here I am reporting about the DevX hackfest that took place right before FOSDEM, at the Betagroup Coworking Space, a very nice coworking place in Brussels with excellent access and great facilities. The hackfest, organized by Alberto Ruiz (thanks!) and sponsored by the Gnome Foundation, had the goal of improving the application developer experience on the desktop, and lasted for three days, with plenty of discussions on a variety of topics, from tooling and IDEs, documentation, languages, libraries to bundling, distribution and sandboxing (and more).

Boston, a hackfest

The Mono & Gnome Festival of Love 2012 is in full swing here in Boston, thanks to the wonderfully stubborn David Nielsen, which got everyone together, got us a great room to work in at the Microsoft NERD Center, and sponsorship by Fluendo, Xamarin, GNOME and PluralSight. Day 2 of the hackfest has just finished, and it was quite an eventful day. After a slow start yesterday (particularly for me, as I managed to completely kill OSX so thoroughly that it wouldn’t boot and required a full restore (all hail up to date Time Machine backups)), today was a pretty interesting day.

Looking back, going forward

May 11, a sunny day in my little corner of the world, was my last day at Xamarin. I’ve spent an amazing 9 months working on Mono for Android, but more than that, Xamarin was a continuation of my work in the Mono team that started in 2006 back at Novell. So, in a sense, this is an end of a cycle. These past 6 years have been life-changing; I dove into professional open source development head first, worked with an amazing team, met a ton of great people, and learned and did so many things that sometimes it’s hard to believe it’s only been 6 years.

Broken by design, I guess

Sometimes I have to jump through so many hoops just get something working, I just have to write it down. Especially because I just know that somehow, somewhere, somewhen, I’m going to have to do it again. Especially in software that I assume should work out of the box, seeing as it’s so popular. Or maybe I just don’t do things the “normal” way and it’s really just me. shrug

OSX, the Air and Recovery Mode, or how to make amazing software

This morning I decided I needed a case-sensitive partition on my MacBook Air. It comes with a nice juicy 250GB SSD and I still have about 140GB left, so, having woken up in an adventurous mood, I open up Disk Utility, peer at the partition, note it doesn’t complain at me if I shrink it a bit, so I go ahead and resize it. I do this, of course, without killing any of the 30 tabs open on Chrome, or closing down the 3 server connections and about 30 channels on LimeChat, not to mention the 10 terminal sessions running various scripts and remote shells, or any of the ton of widgets and apps happily fidgeting in the background.

So long, and thanks for all the fish

Ooops, Is It FOSDEM Time Already?

I guess it is! As always, FOSDEM is great fun, and once again we had a Mono room with lots of great talks! Especially enjoyed Mark Probst and Jo Shields talks, now I know what happens when the deb folks get a hold on our packages, and why we never get our finalizers called in order in Moonlight! As for my talk, the important bits were that I didn’t go over the time, nobody snored, and I made sure there were plenty of lolcats!

A small Fosdem wrapup

The other weekend I was in Brussels for FOSDEM. As you know, this year we had a Mono room on sunday, thanks to the amazing efforts of Ruben Vermeersch and Stéphane Delcroix. The conference was great, as it always is, although as usual as didn’t get to see much of the talks on saturday - busy preparing my own talk about Moonlight, and meeting people, which is one of the parts I enjoy most at FOSDEM.

Solving the gcc 4.4 strict aliasing problems

A couple of days ago Jeff Stedfast ran into some problems with gcc 4.4, strict aliasing and optimizations. Being a geeky sort of person, I found the problem really interesting, not only because it shows just how hard it is to write a good, clear standard, even when you’re dealing with highly technical (and supposedly unambiguous) language, but also because I never did “get” the aliasing rules, so it was a nice excuse to read up on the subject.

Chrome and Moonlight, or how to deadlock a browser

It’s no secret that Moonlight works best on Firefox at the moment - it’s our baseline browser, after all - but we’ve had many requests to add Chrome support, and since it supports NPAPI just like all browsers out there, it should really work out of the box, requiring only some extra code to implement/hackify stuff that Chrome/WebKit doesn’t expose and that we need - basically, DOM support and some downloader tweaks.

Mono Developer Room for FOSDEM 2010!

Some excellent news out of Brussels today, there is going to be a Mono Developer Room at FOSDEM 2010! Call for participation is now open, so come and join us put together an awesome Mono day at FOSDEM! Thank you so much to Ruben Vermeersch for spearheading this effort, together with Stéphane Delcroix. You guys rock! Don’t forget, send in your talk!

New phone, Moonlight almost upon us and other little tidbits from the week

First off, Moonlight news: 2.0 is almost upon us (or upon you, in any case). The official release date is not set yet, but it is going to be in the next two weeks, so if you have bugs that need fixing for the release, speak now or forever hold your peace. Well, not forever forever… you know what I mean :) A simple phone This week I got supremely frustrated with my phone(s).

Doing the Wave

For the past week I’ve been doing the Google Wave dance. First impressions are, it’s a really interesting mashup of different messaging/content concepts - Wiki meets IM meets Email threading - but it’s way too cluttered. The social web evolution tells us that simpler is better, services tend to be straightforward, simple, uncluttered, fast. Google’s own web page was a hit precisely because it was simple, clean and to the point, Twitter and all related services are the same thing.

Binding C++ APIs, the COM way

A couple of days ago, during a routine “aaagh, we still don’t have a nice way to do C# bindings for C++ APIs” discussion, Miguel asked me how hard would it be to leverage COM to bind C++ APIs. I’ve been known to mess around with COM, as when I did Mono.WebBrowser/Gecko C# bindings, but I never did get around to do little test apps to try and streamline the whole process of using COM to bind a C++ API, so I jumped at the chance and got some interesting results.

Book memes for a monday morning

Grab the nearest book. Open it to page 56. Find the fifth sentence. Post the text of the sentence in your journal along with these instructions. Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST. “I was chewing on the peculiar fact that both these photographs were pointing outwards from the desk, when a connecting door opened, and I was suddenly in the presence of Spencer.

Gtk# on Windows - now with more Tomboy flavour!

If anyone missed it, a new shiny Gtk# 2.12.8 installer for Windows is available. As Miguel noted yesterday, it’s a nice small package with the full stack so you have everything you need to develop in an awesome cross-platform way. And speaking of cross-platform development, in case you missed that one as well, a new version of Tomboy is out now, with full Windows and Mac OSX support, for your note-taking pleasure!

Google Summer of Code with Mono!

Calling all students! Google Summer of Code is here, and this is the week where you do your proposals to spend the next few months working on awesome projects on Mono! Our ideas page is here, and the soc page is here. There is a #monosoc channel on dedicated to everything Soc, do don’t delay, do it now!

RIP Mário Gamito

Nem sei o que dizer…

Moonlight shining on Ubuntu

This morning the first thing on the channel was the following excellent news, that I shall now reproduce directly as-read: <directhex> it's official, moon binaries are now trivially installable on any ubuntu 9.04 system <directhex> the 1-click url is [apt:moonlight-plugin-mozilla](apt:moonlight-plugin-mozilla) Awesome stuff directhex, many thanks ot you and everyone else that helped shine a bit of moonlight on jaunty! PS: directhex also noted that the build servers are busy building, so not all architectures might be available right now, just give it a bit of time :)

A little browser sample

By popular demand, here is the sample that I used at the ENEI presentation - a browser in 12 lines of code.

Some busy days ahead

As Mono 2.0.1 is rolling out, I’ll be having a few busy days ahead talking about it. First, at ENEI'08 in Aveiro this sunday October 26, where I’ll be doing a presentation on Mono and integrating a roundtable on mobility and convergence. On November 8th, it’s back to Aveiro for the GLUA TechSessions, where besides me talking about Mono, there’s going to be talks about Gnome, WebKit and much more.

Slides from ENOS 2008 Mono Session

By popular demand, I’m putting up the slides from my afternoon session on the Mono project, presented last weekend (September 6) at ENOS 2008, Instituto Superior de Engenharia do Porto. The talk covers our platform architecture, development status, and takes a look at some of the leading desktop applications built on Mono technology. Download PDF A big thank you goes out to all who attended and made this great event possible, and especially to Carlos Gonçalves, who organized it all and did an awesome job!

It's that time of the year again!

Hack week! does little jiggly dance If you’re not familiar with what it is, here’s the gist of it: For one week, all the geeks at Novell stop what they’re doing and dive into a project of their choice. That’s right, a full week of pure, anadulterated hacking! This year I’m going to use this week to scratch an hitch I’ve been having with bugzilla, by getting together a proper GUI for the thing, together with uber-hacker Marek Habersack.

Generating C# interfaces the lazy way

Since all this Winforms WebBrowser control / Mono.Mozilla / gluezilla business started, there’s one thing that’s been nagging me at that place in the brain where I store stuff I’d rather not think about at the moment (and yes, it’s a place that quite resembles those junk-filled attics you see in movies where the kids go to play and occasionally encounter old moth-eaten dresses, the occasional treasure map or your garden-variety skeleton of the aunt nobody had seen in 50 years - a stuffy, moldy place where you can’t take a step without tripping on something…)…

Some busy days ahead

I had written this huge post about how awesome the Mono Summit in Madrid was, how great it was to meet everyone (some again, some for the first time face-to-face), how much I learned from talking and sharing ideas and watching the presentations… and then @#$@$% synergy went and turned on control again and when I scrolled, the entire page was gone! gnnngnnnngnn Of course, the autosave function didn’t work either, so I was left with the title and the first line….

Microsoft disponibiliza código fonte

Como já devem ter lido por aí, a Microsoft anunciou que irá disponibilizar o código fonte da maioria das bibliotecas do .NET 3.5. O código estará disponível para download, e estará integrado no Visual Studio 2008, pelo que passará a ser possível fazer debug ao .NET, tal como, aliás, o pessoal do Java já pode fazer há uma data de anos. Já houve muitas reacções e comentários a esta notícia. Como parte integrante da equipa do Mono, não posso deixar de frisar o seguinte aviso:

Mono.Mozilla on Windows

Alexandre Gomes posted on his blog his experiences getting Winforms+Mono.Mozilla building and running on Windows. First of all, I’d like to thank him for taking the time to try this out; I’m building regularly on Windows and I try to keep things simple, but things do always slip past unnoticed (especially when trying to keep linux, win+vs2k3 and win+vs2k5 in synch), so it’s great to have an external pair of eyes looking at your stuff :)

Something I drew...

Today I happened to be looking for a pic on my hd, and I came across the following picture. First off, translation: Top: “Citizen calling the tax service helpdesk so as not to waste the time of actually going there.” Bottom: “The good thing is you get to hear a nice lullaby while you wait.” I drew this in Photoshop, carelessly doodling, while waiting for the helpdesk callcenter to pick up my call.

Interesting conversations

Being a very, errr, head-in-the-clouds sort of person, I had to go in a rush to renew my ID card. It expired yesterday, and I completely forgot to renew it before today, multiple warnings from friends, family and the occasional stranger notwithstanding. It’s especially bad due to the fact that I sorta need it for an official thingamajig tomorrow, so it was kinda important to have it up to date… or at least not expired :p

Desafio Literário

Pois é, andava eu a espreitar os vários blogs do, quando dou de caras com um Meme Literário no blog do Luís Nabais, Stat(ing) My Mind. “Que interessante”, pensei eu, enquanto mastigava uma noz (a propósito, spoiler warning, a resposta é Dune, é a cena quando o Duque acaba de ser apanhado e está a perder a consciência, e prepara-se para envenenar o médico, convencido que este é o Barão, até já estou a ver a cena toda na cabeça… :) )

Windows Forms WebControl and Mozilla

It’s been a while since I’ve blogged about the status of Mono’s MWF WebControl - I kept adding stuff, then I wanted to settle it down on the tree, and then I went on vacation and ran out of net (but not out of fish.. yum!). So now that I’m fed up with fish and my net is back, let’s talk about the latest webcontrol milestone. The code is split up into three components: the WebBrowser and related classes inside MWF (Mono’s winforms implementation); Mono.

Slowly but surely...

… things end up working. The last blog entry spoke of a successful embedding of xulrunner into a mono winforms app, on windows, and I had hoped that one or two days later I would be blogging about it working on linux as well. Unfortunately, it turned out not to be as simple as that. It actually turned out to be really complicated. First, while on windows I only had to feed xulrunner with the windows hwnd handle and voilá, it worked, on linux xulrunner uses gtk by default.

A little browser glue

It’s a real pity I didn’t have this to blog about yesterday, it would be a really nice way of celebrating Portugal day (which was yesterday, June 10th :) yay for us!). If it weren’t for some pesky bugs yesterday… Anyway, great blog-worthy news today, got the Mono WebControl -> Gecko thing going, and it’s alive and drawing! Check out this screeny of the mozilla engine rendering a webpage inside Mono…

Now where did I put my type?

Today I ran across an interesting problem while trying to export a function from a dll built in vc++ (2003). I’ve been digging into the mozilla source a lot lately, doing the library to embed mozilla and get our much-needed webcontrol working on Mono, and after a successfull browser window invocation from .net (screenies to come soon) (woohoo), I decided to clean up the code a bit and start doing the functions properly.

Playing with my n800

I’m happily playing with my new Nokia n800 - affectionately named, by me, “Transistor”. It’s a slick little thing (well, no so little, but then again, it’s mostly screen), but I think someone got sold that transistor radio designs from the 60s are all the rage. The n800 even has the traditional dotted grid. I mean, just look! Coincidence? I think not! But once I started tinkering with it, I forgot all about that :)

.NET Bugs Registry

.NET Bugs Registry Nice handy list for those weird things that can bite you when you least expect it…

NumericUpDown is a nice control... eh

NumericUpDown Bug From the site: FAQs NumericUpDown How do I get the Tooltips to be shown on a NumericUpDown control? This is because of a bug in the .NET Framework. When tooltips are set on a control that hosts other controls within it (like the NumericUpDown), tooltips are not shown on those child controls. To workaround this issue, do the following in code: [C#] foreach ( Control c in numericUpDown1.Controls ) tooltip.

Focusing on cue

One of the challenges of implementing the Winforms behaviour from scratch is emulating all the little quirks that have accumulated over the years on Windows and that show up in .NET. One of these little thingies that make for big headaches is the visual focus cue. You know, that little rectangle that appears in controls whenever they have focus. Well, it turns out this apparently simple thing as showing a rectangle drawn on a button is not so simple at all, because it doesn’t show up every time a control has focus… there are certain rules that control when it should appear (the headache part :p)

New job, new open source project, happy little coder

As the title says, I have a wonderful new job, working full time at Novell on my favourite open source project, Mono. What more can I say? :D happy little coder does happy little jiggly dance

A bit of a SHOUT

So there was I, coding happily along, without a care in the world, when it hits me. Well, it didn’t hit me, it more of skipped me. I mean, not me. The music. It skipped. Aargh. Focus lost, damn stupid tracks, winamp what’s the matter with you?! Ok, so I get my mp3 off the TeraStation. The TeraStation is very nice, very lovely, very cute RAID-5 network-attached data storage (note the marketing speek - ain’t it nice) box looking thingie all in silver.

The Active Directory datatype cannot be converted to/from a native DS datatype

The nice sentence above gave me quite a headache today… as I was deploying the authentication for web app, it blew up with this rather cryptic message, as did every other authenticated web app installed on the machine. The solution is very simple, so if you happen to get hit by this one, the problem is essentially that the type cache has gone corrupted in a rather typical windows manner, so you have to force it to be rebuilt.

Forgot the Administrator's Password?

Forgot the Administrator’s Password? - Change Domain Admin Password in Windows Server 2003 AD Some amazing tidbits of information on how to manipulate windows to do your bidding. It really shows how complex applications end up being almost impossible to secure… especially when they were not designed to be secure to begin with.

How to write Buffer Overflows in Assembly

How to write Buffer Overflows in Assembly Just as the author wrote the article as a reminder of how to do it, so I am putting this one here so I can remember where to find it! :p Wish I’d do as he did more often, I seem to keep losing code everywhere nowadays…

ServiceController AccessDenied exception

ServiceController AccessDenied exception Reminder to self: Just so I know where to look for this when it eventually hits my face, which will eventually happen when I eventually have to try and control a remote service… eventually… :p… When I get this nice little error in my face, the solution is: _“The command ID parameter should be an integer value between 128 and 256. Values less than 128 are reserved

Further problems with SHA-1

Further problems with SHA-1 So what is SHA-1? From wikipedia: _The SHA (Secure Hash Algorithm) family is a set of related cryptographic hash functions. The most commonly used function in the family, SHA-1, is employed in a large variety of popular security applications and protocols, including TLS, SSL, PGP, SSH, S/MIME, and IPSec. SHA-1 is considered to be the successor to MD5, an earlier, widely-used hash function. The SHA algorithms were designed by the National Security Agency (NSA) and published as a US government standard.


Nothing at all related to coding, this one, but leaving it here as a reminder for myself later - from September 23 to October 18, at Faleria António Prates, there will be a show of paintings done by robots created by a painter, Leonel Moura. Tak about conceptual art :p


Forensics Not directly related to coding, but a very interesting topic on it’s own, is Computer Forensics and Incident Response. To relate this to coding, this field is so new that there’s a huge need for good solid reliable smart tools to analyze and extract information from systems. I mean, even the most basic of informations, like knowing the memory map of a running windows system, is still an unkown!

First Post!

And we start off with a classic. drum roll please… God, root, what is difference?