Sérgio Henriques

About Me

Here are some things that you should know about me.

Sérgio Henriques

Software Engineer

My name is Sérgio Henriques and I am a Software Engineer. I work mainly on designing and building web-based applications that have a strong database content.

I design and develop web/mobile applications mainly using PHP or Microsoft technologies on the backend and various JavaScript/Html libraries at the front end. I have strong technical skills around MySQL databases, including Microsoft's database access technology, Entity Framework. I have equally strong know-how on building the web front end using Microsoft's ASP.NET MVC and JavaScript libraries.


Notebook of my daily problems solutions

Upgrade XAMPP in Windows

I had to write this article cause I couldn’t find any complete solution to help people out with updating XAMPP in Windows. Well, finally here is a easy to understand, step by step guide to upgrade XAMPP that actually works. Kudos! SOME MAJOR CHANGES! If you are updating XAMPP after a long time like me than be ready for some major changes. XAMPP no longer […]

Parse apache vhosts file

So, I wanted to parse the apache config file so I could get the ServerName and the DocumentRoot of each VirtualHost. awk ‘/^<VirtualHost*/,/^<\/VirtualHost>/{if(/^<\/VirtualHost>/)p=1;if(/ServerName|DocumentRoot|## User/)out = out (out?OFS:””) (/User/?$3:$2)}p{print out;p=0;out=””}’ vhosts.conf The command will output the info in the format: ServerName DocumentRoot or opposite depending on the order in which they appear on the VirtualHost   […]

Change sendmail queue

To actually change it, modify the /etc/sysconfig/sendmail file. It’ll look something like this: DAEMON=yes QUEUE=1h Change the QUEUE unit to suit your preferences. QUEUE=5m

Forcing queue send on individual email message

You can flush the message with: sendmail -qIyourqueueID -oTnow The “I” flag to the -q flag specifies which queue ID to use. The -oTnow flag sets the queue timeout to “now”. Note sendmail will still try to deliver the message once when you do this.

Permissões para escrever numa pasta no IIS 7.5

Giving write permissions to all IIS_USRS group is a bad idea from the security point of view. You dont need to do that and you can go with giving permissions only to system user running the application pool. If you are using IIS7 (and I guess you do) do the following. Open IIS7 Select Website […]

Vulnerable service: Netbios

Go into your firewall file /etc/sysconfig/iptables. If you use Active Directory and want to enable that function ONLY in Samba use. -A RH-Firewall-1-INPUT -s -m state –state NEW -m tcp -p tcp –dport 445 -j ACCEPT -A RH-Firewall-1-INPUT -s -m state –state NEW -m udp -p udp –dport 445 -j ACCEPT Don’t be […]