I hereby claim:
- I am mattboehm on github.
- I am mattboehm (https://keybase.io/mattboehm) on keybase.
- I have a public key ASAG7HB6IlBoTjEkg1-4QQCJmvyilUvwJxGyCnq7PNElCgo
To claim this, I am signing this object:
"with your cursor on a line or a block selected, type `:HL` | |
"to remove, on each line call :sign unplace | |
highlight HL ctermbg=darkgray | |
sign define hl linehl=HL | |
let s:highlightLineSignId = 74000 | |
function! g:HighlightLine() | |
execute 'sign place' s:highlightLineSignId 'line='.line(".") 'name=hl' 'file='.expand("%") | |
let s:highlightLineSignId += 1 | |
endfunction | |
command! HL call g:HighlightLine() |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
nnoremap <silent> <leader>gm :tab split<CR>:Glistmod<CR> | |
nnoremap <silent> <c-s-j> :call g:DiffNextLoc()<CR> | |
nnoremap <silent> <c-s-k> :call g:DiffPrevLoc()<CR> | |
command! Glistmod only | call g:ListModified() | Gdiff | |
function! g:ListModified() | |
let old_makeprg=&makeprg | |
let old_errorformat=&errorformat | |
let &makeprg = "git ls-files -m" | |
let &errorformat="%f" |
"A small script to measure typing speed | |
"Shows speed in bottom bar when you leave insert mode | |
"Run :messages to see all recent speeds | |
"This script was a hack thrown together in 10-15 minutes and has not been well tested yet. | |
function! s:insertEnterTypespeed() | |
let b:startTime = localtime() | |
endfunction | |
function! s:insertLeaveTypespeed() | |
let chars = strlen(@.) | |
if chars |
#python3 | |
from collections import defaultdict, Counter | |
import pprint as pp | |
DV_KEYS = [ | |
"',.pyfgcrl", | |
"aoeuidhtns", | |
";qjkxbmwvz", | |
] | |
KEYS = [ | |
"qwertyuiop", |
def solve(d): | |
d2 = re.sub("!.", "", d) | |
d3 = re.sub("<[^>]*>", "", d2) | |
return len(d2) - len(d3) - 2*d2.count(">") |
must be run on cell size of 16 bits or more with wrapping on inc and dec operations | |
>> | |
,[------------------------------------------------>,] read input and convert ascii digits to data | |
copy the first digit to the end (to handle wrapping) | |
+ add 1 to the end space to mark it | |
[<]> goto first digit | |
[<+[>]<+[<]>>-] move to marked space and the space before first digit <[>+<-] >[>]< |
must be run on cell size of 16 bits or more with wrapping on inc and dec operations | |
>>>>>> | |
,[------------------------------------------------>>,] read input and convert ascii digits to data | |
data is loaded into an array with empty slots in between the data cells | |
get len | |
<<[while still on a number | |
>[-<<+>>]<<+< move len counter to the left and inc | |
] |
I hereby claim:
To claim this, I am signing this object:
"""See how many qwerty words are also dvorak words""" | |
from __future__ import print_function | |
import string | |
QWERTY = "][abcdefghijklmnopqrstuvwxyz" | |
DVORAK = "=/axje.uidchtnmbrl'poygk,qf;" | |
TRANS = string.maketrans(QWERTY, DVORAK) | |
def main(): | |
with open("/usr/share/dict/words") as f: | |
words = frozenset((word.strip().lower() for word in f)) |