GithubHelp home page GithubHelp logo

alexcp / pomodoro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steveklabnik/pomodoro

0.0 2.0 0.0 81 KB

A pomodoro counter, that turns off your access to certain sites.

Home Page: http://github.com/steveklabnik/pomodoro

pomodoro's Introduction

Pomodoro

A gem to make you productive.

Wait, what?

Yeah, that's right. See, there's this great noprocrast gem that tuns off your access to time-sucking sites, like Twitter and Hacker News. The problem with the gem is that you have to turn it on and off yourself, and I don't have that kind of self-control. I'll forget to turn it back on, and then keep wasting time.

So I avoided doing more work by making Yet Another Gem: Pomodoro!

The Technique

The 'pomodoro technique' is a time-management technique named after tomatos. I have no idea, either. Basically, you work for 25 minutes, and then take a break for 5.

So what's it actually do?

Basically, when you start it up, it changes your /etc/hosts file to redirect websites to localhost. Then, it does two things: starts up thin to run a tiny website on localhost that tells you you're a bad person if you try to visit one of those sites, and spins up a thread to run in the background, that checks every 5 minutes to see if the timer is up. Once 25 minutes have gone by, it lets you back into your sites, and 5 minutes later, shuts you out again.

Oh, and you get growl notifications every time the switch happens.

How do I get it?

Small note: This only really works with OSX. Patches welcome!

Just gem install pomodoro. Easy-peasy!

How do I use it?

Just sudo pomodoro start in a terminal. If you're using rvm, you may want to rvmsudo instead.

Sudo is needed because noprocrast messes with your /etc/hosts file. Since that's neccesary, I also decided to run the local site on port 80, for simplicity's sake, and that takes root permissions too.

If this worries you, check out the source. It's real short. No tricks up my sleeve!

If you'd like to change the sites it blocks, sudo noprocrast edit will open your $EDITOR and let you change it up.

Future stuff

  • Eventually, I'm sure this could be useful on other platforms.
  • Maybe a simple to-do list with HTML5 local storage could be cool, rather than yelling. Dunno.
  • Pretty icons for growl
  • Growl notifications on how much time you have left.

pomodoro's People

Contributors

steveklabnik avatar benedmunds avatar

Watchers

Alexandre Croteau-Pothier avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.