Archive

Archive for May, 2016

a simple GUI pomodoro timer

For managing my TODO lists, I use a sheet of paper where I make a list of tasks to do. A few days ago I started to use the pomodoro technique, which helps a lot to actually DO those tasks :)

As I don’t have a tomato-shaped kitchen timer (yet!), I wrote a simple GUI timer that you can find on github.

Update (20160608)
Here is an online timer: http://www.timeanddate.com/timer/. It can play a sound, and you can also launch several timers if you want. Thanks Jeszy for the link.

Advertisements

vulture is available in neomake

May 29, 2016 1 comment

Recently I started to use neovim (here is my story). I mainly edit Python codes so I looked around and collected some useful plugins (here is my init.vim file). One of these plugins is neomake, an asynchronous :make using Neovim’s job-control functionality (it also works in ordinary vim, but without the asynchronous benefits).

I had a little contribution to neomake and that’s what I want to write about in this post. I sent a pull request to include vulture as a Python maker. Vulture finds unused classes, functions and variables in your code. Let’s see two screenshots without and with vulture:

Without vulture:
vulture_without

With vulture:
vulture_with

init.vim settings
Here is my corresponding settings that enables vulture too:

Plug 'neomake/neomake'
" {{{
    " neomake is async => it doesn't block the editor
    " It's a syntastic alternative. Syntastic was slow for me on python files.
    " $ sudo pip2/pip3 install flake8 -U
    " $ sudo pip2/pip3 install vulture -U
    let g:neomake_python_enabled_makers = ['flake8', 'pep8', 'vulture']
    " let g:neomake_python_enabled_makers = ['flake8', 'pep8']
    " E501 is line length of 80 characters
    let g:neomake_python_flake8_maker = { 'args': ['--ignore=E115,E266,E501'], }
    let g:neomake_python_pep8_maker = { 'args': ['--max-line-length=100', '--ignore=E115,E266'], }

    " run neomake on the current file on every write:
    autocmd! BufWritePost * Neomake
" }}}

Links
Pull requests #420 and #440.

Categories: python Tags: , , , ,