Fullsix Engineering

XNA, Yesterday – Now – Tomorrow

Saturday, April 10th, 2010
Autor: goncalo.chaves


xna11 thumb XNA, Yesterday – Now   Tomorrow

Once again Microsoft has invited a fullsix employee to be speaker on a great gamming event, so I would like share with all of you my presentation slide deck, from the last XNA Pizza night 2010 event.

It’s was great gathering about this growing technology. Although the game applications also it’s a great framework for other applications, such as medical image, 3D simulation and so on.

You can see more at the event page.

Download SlideDeck in pdf.

News: http://creators.xna.com/en-US/spotlight/MicrosoftPortugal

Find orphaned logins in your SQL Server

Friday, March 5th, 2010
Autor: pedro.oliveira


If you are in the hosting business, or if you just create and delete a lot of users from your SQL Server instance, you might have the need to periodically check if there are orphaned logins in your server. These logins don’t have any database user mapped, and if they don’t have any relevant server role assigned they can be safely removed if needed.

During a recent credential rotation maintenance on our hosting servers I intended to list any orphaned logins that could have been left behind for some reason:


USE MASTER;

CREATE TABLE #dbusers (
sid VARBINARY(85))
EXEC sp_MSforeachdb
'insert #dbusers select sid from [?].sys.database_principals where   type != ''R'''
SELECT name
FROM     sys.server_principals
WHERE    sid IN (SELECT sid
FROM   sys.server_principals
WHERE  TYPE != 'R'
AND name NOT LIKE   ('##%##')
AND name NOT LIKE   ('%\%')
AND name NOT LIKE ('NT   %')
EXCEPT
SELECT DISTINCT sid
FROM   #dbusers)
GO
DROP TABLE #dbusers

This script makes the assumption that the logins you are targeting are SQL logins, and not Windows logins (hence the ‘%\%’ term).

Second Annual Scrum User Group Meeting – The after

Wednesday, February 3rd, 2010
Autor: goncalo.chaves


ScrumUserGroup Portugal sm1 thumb Second Annual Scrum User Group Meeting – The after

Hi all,

Today at Microsoft Portugal took place the 2nd Annual Scrum User Group meeting. With a great morning sessions opened by Dr. Jeff Sutherland, then Mitch Lacey and two Portuguese testimonials with: Prof. Ademar Aguiar and Mário Araújo.

The Microsoft’s auditorium was full with more then 120 people engaged to learn and exchange Scrum best practices and knowledge. You can review the agenda here:

http://www.fullsix.pt/scrum/Annual_Meeting_2010.htm 

And some photos about it at:

http://www.flickr.com/photos/gchaves/sets/72157623217629763/

I really enjoyed the sessions and Tiago Andrade e Silva (our fullsix Portugal CTO) suggested a next meeting with a full user group feedback interaction about individuals experiences with Scrum.

Stay tuned for next meetings and training at: www.fullsix.pt/scrum

Remove Spammers of your Community Server

Tuesday, January 19th, 2010
Autor: goncalo.chaves


Hi all,

I would like start this new year with a full dedicated post of one of hell head pain, that’s your usual community server 200x installation with tons of spammers users and content…

I’ve been working with Community Server from Telligent a while ago, and it’s a nicer community driven web platform, and if we could get the CS with Umbraco in the same web site I could say that solution would be the 90% useful in most websites of this days.

Has we have some CS community web sites, we notice that they have been a nice target for the tons of spam and unwanted content… really? who wants sex terms related ads, in your peacefully community site? So he had our mission to go…

First – Protect, close the gates

Sure, the first step is get something that kept the registration form (ie. /yourTheme/users/createuser.aspx) protected against the spammer robot, so the one that we’ve chosen was a captcha mechanism, in order to require a code that only the user can decipher from the image. Sounds promising… from the paper into the code we found a captcha control named Upupo Captcha … nice! It comes with the dll and a sample that we can apply on our pages.

So we first insert the control into the createuser.aspx registration form in order to avoid new spam registrations icon smile Remove Spammers of your Community Server

<%@ Register Assembly="Upupo.Captcha" Namespace="Upupo.Captcha" TagPrefix="Captcha" %>

In page look like:

image thumb1 Remove Spammers of your Community Server

With a required control inside of it the automatic spammer cannot advance on this…. at least for now.

So now we close the entrance for new registrations… now let’s deal with the spammer content…

Note, if you want to improve protection with this control you can add it into the comment blogs forms, forum post form and media post form. Same way as the sample createuser.aspx sample page.

 

Second – Delete, kill all spam traces

Now that we close doors for unwanted “fake persons”, maybe you notice that your community has increased in 2500 new users in some days… wow… all spammers, all trash… so another head pain was how we can remove this guys and grant the database data integrity. When cs has a new user he create a lot of references inside the ASP.NET Membership tables and in CS_ tables… and to help the field UserID is different from the Memebership UserId … yeah… not great implementation.

Although this little issue, you can remove using the ControlPanel, on Memebership administration section, but you have to search and then remove one by one… NO WAY!

That’s right so how we can automate this process, in order to remove the unwanted users and delete related content?

If you explore the StoredProcedures from your CS database you will find something like this:

image thumb2 Remove Spammers of your Community Server

Hum… <dbo.cs_User_Delete> sounds good, and it sounds! This Sp is used each time that you delete a user using the control panel on the membership admin section. So all we needed to do in order to automate the remove process of this users and contents was a custom SQL to execute this SP with some additional prams and features.

So we used this sp to execute for each registration that we want to find so we did something like this:

SELECT 'EXEC cs_User_Delete '+ CONVERT(int,UserId) + 'Anonymous'
FROM  dbo.cs_Users
WHERE UserName like '%.%.%.%'

So now we’ve only made some adjustments on the LIKE statement in order to catch all spammers, so spaces, keywords that we know like casino or hotel or pharmacy, this query selects all that and draws the execution SQL of the CS delete SP necessary and deletes from all tables the user data and assign their related content with the Anonymous user. Sweet ha?

With this we were capable of remove all spammers from our CS based sites. this is only one tip maybe there are others but the telligent community unfortunately don’t care anymore and I couldn’t find anything related with this.

Stays another journey with CS.

Conta-me como foi!

Thursday, January 14th, 2010
Autor: cesar.silva


Acordei eram 4:10 da manhã… estava sem sono. A bolonhesa que havia feito para jantar pontapeava-me agora o estômago pelo que decidi levantar-me para beber uma água das pedras. Bolas… acabaram! Não fazia sentido tentar voltar a dormir, por isso, liguei o portátil e fui ao Google pesquisar por quantos dias aguenta um gato sem comer. Pobre Sushi! Mal sabe o que a espera…

Acabei no youtube… e depois de escolher o sonzinho que me apetecia ouvir, passei pelo facebook e servi as Impossible Quiche que havia feito 2 dias atrás… eheheheh, continuo em primeiro lugar entre todos os meus vizinhos (desde que o Cruz desistiu)!

Lembrei-me então que no dia anterior tinha circulado um e-mail pelo departamento, que perguntava se alguém havia feito um “métodozinho” que devolvesse uma frase à la facebook que indicasse quanto tempo faltava para determinada data ou quanto tempo havia passado desde então.

Hoje não vou perder muito tempo a explicar o que fiz ou porque fiz desta ou daquela maneira. Mas para quem quiser saber há quanto tempo foi o 25 de Abril de 1974… aqui fica mais um exercício que pode dar jeito.

Porque uma imagem vale por 1000 palavras…

image thumb Conta me como foi!

Este resultado foi obtido através das seguintes linhas de código:

// Output the time capsule result
TimeCapsuleResult1 = new TimeCapsule(new DateTime(1974, 4, 25)).TakeUsToWarpSpeedMrScott().ToString();

// Output the time capsule result
TimeCapsuleResult2 = new TimeCapsule(new DateTime(2010, 1, 14, 14, 53, 12)).TakeUsToWarpSpeedMrScott().ToString();

// Output the time capsule result
TimeCapsuleResult3 = new TimeCapsule(DateTime.Now.Subtract(new TimeSpan(7, 0, 0, 0))).TakeUsToWarpSpeedMrScott().ToString();

Para quem quiser os ficheiros com a implementação deste exercício (sem os quais a chamada de cima não faz qualquer sentido), podem retirá-los em Source Code.

Curiosidades

Ao que parece o PHP já faz isto de forma nativa… alguém se deve ter dado ao mesmo trabalho! icon razz Conta me como foi!


Better Tag Cloud