• 6 April

    How to make Ubuntu start/resume faster after hibernate

    I had a problem with Ubuntu 10.10 Maverick on my laptop. The problem was that It took too long to start/resume after going to hibernate. Sometimes it almost took 5 minutes for the computer to resume to a usable state.
    After some goggling I found an easy solution to the problem.

    Step 1: Install uswsusp by typing: sudo apt-get install uswsusp
    Step 2: Add the line SUSPEND_MODULES=”xhci-hcd” to the end of /etc/pm/config.d/00sleep_module (on my machine the file didn't exist so I just created it and added the line)

    Step 3: Test by typing: sudo s2disk
    Now the problem should be solved. After the fix it takes around 30-60 seconds for my laptop to resume after hibernate.
    Posted 20:35, 06 Apr 2011 in Linux tagged Hibernate, Ubuntu
  • 18 February

    Using virtualenv in PyCharm

    This is how you do if you want to use virtualenv when you develop something in PyCharm.

    1. Create or open your project in PyCharm
    2. Go to File - Settings in the menu (or just click on the settings icon)
    3. Go to Python Interpreter
    4. Click on Add in the top
    5. Go to the bin folder where you created the virtual environment and select python

    Now PyCharm will setup the library files for the python interpreter in the selected virtualenv and you're good to go.
    Posted 22:11, 18 Feb 2011 in Development tagged PyCharm, virtualenv
  • 2 February

    How to debug :hover states in Firebug

    Today I learned a nifty function in Firebug that you can use when you want to "freeze" a :hover state on an element and be able to see and change the styles.

    1. Right-click on an element on the page that got a :hover style that you want to work with and select "Inspect element".
    2. Go to the style tab in Firebug and click on the down-arrow.
    3. Select ":hover".

    Now you can see all the :hover styles for that element.
    Simple but useful.
    Posted 13:38, 02 Feb 2011 in Development tagged CSS, Firebug, Firefox