What Up Derek?

  • Archive
  • RSS
  • Ask me anything

Put Display to Sleep With Alfred

Buh-Bye is an Alfred extension that allows you to put your display to sleep.

You’ll need 2 things for this to work:

  1. Set your top-left hot corner to put the display to sleep. Hot Corner
  2. And the Alfred Powerpack.

Install the plugin by double clicking the icon. Invoke by typing bye.

Action Shot

It works by executing an apple script originally found at http://hints.macworld.com/article.php?story=20100418152304108.

    • #alfred
    • #tip
    • #osx
    • #mac
  • 7 months ago
  • 26
  • Permalink
  • Share
    Tweet

Great tip on altering settings for unittest.

I’d come across some manual overrides on a per-test basis, but they weren’t helpful for project wide settings used in multiple tests such as what database to use.

http://seanhayes.name/2010/01/09/test-database-django/

Create a test_settings.py module and override whatever you want. Throw the following code at the bottom of your main settings.py module and you’re good to go. Check the link if you’d like a full explanation.

if 'test' in sys.argv:
    try:
        from test_settings import *
    except ImportError:
        pass

I am using this to utilize sqlite for testing which yields a HUGE speed boost.

    • #django
    • #tip
    • #testing
  • 2 years ago
  • Permalink
  • Share
    Tweet

About

Pages

  • Resume
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr