Skip to content

Instantly share code, notes, and snippets.

I break things to see how they (don't) work

Evgeni Kunev kunev

I break things to see how they (don't) work
View GitHub Profile
kunev /
Created Nov 14, 2018
Configure and install vim from source on debian based distros the way I like it
function config() {
./configure \
--with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
--enable-python3interp=yes \
kunev /
Created Oct 9, 2016
check if currently running kernel version matches the installed linux package version
function currently_installed_kernel() {
yaourt -Qi linux | egrep '^Version\s+:\s+.+$' | sed -e 's/Version\s\+:\s\+//'
function currently_running_kernel() {
uname -a | grep -P '\S+(?=-ARCH)' -o
kunev /
Created Oct 7, 2016
a script to handle editor://$FILE_NAME:$LINE_NUMBER URIs
#!/bin/env python
import os
import subprocess
import sys
import re
uri = sys.argv[1]
file_path_with_position = re.sub(r'editor://|vim://', '', uri)
kunev /
Created Jul 17, 2016
fzf menu to start/attach a tmux session
if [[ -z $TMUX ]]; then
new_session_token='START NEW SESSION'
no_session='DO NOT START TMUX'
choice=$( (echo $new_session_token; echo $no_session; tmux ls) | fzf | cut -d':' -f 1)
case "$choice" in
tmux new-session
View swap_quotation_marks
'<,'>s/\v("|')/\={'"': "'", "'": '"'}[submatch(0)]/g

Keybase proof

I hereby claim:

  • I am kunev on github.
  • I am kunev ( on keybase.
  • I have a public key whose fingerprint is 1A89 8964 FF14 2DF6 EF0E C6C2 A3F7 AD9C FB5D 25E8

To claim this, I am signing this object:

kunev / powerlinish.css
Created Oct 13, 2014
powerlinish firefox
View powerlinish.css
@namespace url(;
#forward-button {
kunev /
Last active Sep 14, 2015
display date header in local time in mutt
#!/usr/bin/env python
# Save this in a file somewhere
# In your mutt config add the following line
# set display_filter="/PATH/TO/THIS/PYTHON/FILE"
import sys
import re
import os
kunev / pattach
Last active Aug 29, 2015
tmux attach with percol
View pattach
function pattach() {
if [[ $1 == "" ]]; then
PERCOL="precol --query $1"
sessions=$(tmux ls)
[ $? -ne 0 ] && return
session=$(echo $sessions | eval $PERCOL | cut -d : -f 1)
if [[ -n "$session" ]]; then
kunev /
Last active Jul 9, 2020
Coroutines example with python's asyncio module
import asyncio
def open_file(name):
print("opening {}".format(name))
return open(name)
def close_file(file):
print("closing {}".format(