Wednesday, October 28, 2009

ubuntu firewall


sudo apt-get denyhosts
sudo apt-get install ufw
sudo apt-get install gufw
sudo ufw status
sudo ufw enable
sudo ufw limit ssh/tcp
sudo ufw allow proto tcp from 192.168.1.0/24 to any port 22

Tuesday, October 13, 2009

wxwidgets screenshot


wxWidgets wxMemoryDC

wxScreenDC dcScreen;
wxCoord screenWidth, screenHeight;
dcScreen.GetSize(&screenWidth, &screenHeight);
wxBitmap screenshot(screenWidth, screenHeight,-1);
wxMemoryDC memDC;
memDC.SelectObject(screenshot);
memDC.Blit( 0, 0, screenWidth, screenHeight, &dcScreen, 0, 0);
memDC.SelectObject(wxNullBitmap);

http://trac.wxwidgets.org/ticket/11007






source(s): http://www.source.com

vaccum a firefox sqlite database

in the firefox-error console type the following:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");


in the firefox profiles folder. look for: *.sqlite