Skip to content

Instantly share code, notes, and snippets.

@ryanpetrello
ryanpetrello / gist:6626ae4fe1e20ce651e3e83f677dc602
Last active Oct 18, 2016
Potential Python 3.5 signal.signal regression?
View gist:6626ae4fe1e20ce651e3e83f677dc602
$ python2 --version && python3.4 --version && python3.5 --version
Python 2.7.11
Python 3.4.4
Python 3.5.1
$ cat alarm.py
import signal
import time
def receive_alarm(signum, stack):
View gist:8397a8b71c1406112482bd008d70c1b6
" -- git blame for current file
function! GitBlame()
let sha = matchstr(system('git --no-pager blame '.expand('%').' -L '.line('.').',+1'), '^\^*\zs\S\+')
let command = join(map(split('git show '.sha), 'expand(v:val)'))
let winnr = bufwinnr('git.blame')
silent! execute winnr < 0 ? 'botright new ' . 'git.blame' : winnr . 'wincmd w'
setlocal buftype=nowrite bufhidden=wipe nobuflisted noswapfile nowrap number filetype=diff
silent! execute 'silent %!'. command
silent! execute 'nnoremap <silent> <buffer> q :q! <CR>'
endfunction
View keybase.md

Keybase proof

I hereby claim:

  • I am ryanpetrello on github.
  • I am ryanpetrello (https://keybase.io/ryanpetrello) on keybase.
  • I have a public key ASC6lll9knTfAYUfm6vvImbKmCzQkqgQSNCgajfBSZJRfAo

To claim this, I am signing this object: