Neg blog · Neg blog

pci-e passthrough with QEMU on intel / nvidia platform (part 2)

I’ve made some interesting improvements to my qemu-based pci/usb passthrough as dynamic (passthrough to guest / restore to host) usb devices as mouse and keyboard, network card passthrough for theoretically better latency, huge pages memory preallocation, etc.

[Read more]

Nice tool to remind neovim/vim keybindings

Nice tool to remind nvim/vim keybindings: asciicast

Clipboard management

Думаю, что многие сталкивались с тем что скопировав что-то в буфер обмена, они потом вспоминали что это не то что им нужно. Особенно это актуально если используется не подсистема windows или mac os, а X11, где по-умолчанию во многих DE могут синхронизироваться побочный(SECONDARY) буфер, который используется для Ctrl-C/Ctrl-V. Для борьбы с этой напастью существуют менеджеры буфера обмена, такие как clipit/parcellite, gpaste, klipper, clipster и другие. Я рассмотрю два самых “современных” и удобных для себя на данный момент: Gpaste и clipster. Они интересны тем что на мой взгляд хорошо соответствуют концепции UNIX-way, где их вывод можно перенаправлять куда-то ещё: dmenu/rofi, различные фильтры и тд и тп. Ещё существует достаточно похожий на clipster greenclip. Он интересен тем что сделан на haskell, что для многих усложнило бы его разработк, но по моим личным ощущениями работает он не быстрее чем greenclip, несмотря на то, что вроде как код, который генерирует ghc может быть быстрее.

Тем, кто хочет знать, как это всё настроено, добро пожаловать под кат.

[Read more]

pci-e passthrough with QEMU on intel / nvidia platform

I will tell you some “success story” about pci-e passthrough Geforce 980 GTX videocard with QEMU / KVM to Windows 10 guest system for gaming. As the result you’ll get system almost with no overhead(1-10%). If you are interested in this welcome under cut.

[Read more]

Nice music previewer for various music genres/tags

Once upon a time I found this interesting site: You can discover various new musical genres and “tags”. Maybe it does not contains all the tags/genres ever, like oceangrunge for example, but anyway idea looks interestring.


Interactive clip which tracks everyone's mouse cursor position, to show it to everyone

If you are feeling bored try this: donttouch

This records you actions like mouse clicks/movements to show it to other listners. I think that it’s pretty nice idea but nonperfect implementation: for my taste something more abstract and artificial stuff is better, but anyway try it and maybe you’ll like that.

Cyclesort: unusual O(n+m) sorting algorithm

One day I’ve discovered some interesting algorithm: cyclesort. There is interesting paper about it. And also nice explanation on

I think that main idea is pretty clear: you can decompose any permutation into a unique set of disjoint cycles and then apply them to get lexicographical order.

Also look at this explaination:

l=[0, 5, 6, 8, 7, 4, 9, 1, 3, 2]

cls=[], i=1 cycle=[]
cls=[], i=1 cycle=[]
cls=[], i=1 cycle=[1]
cls=[], i=1 cycle=[1, 5]
cls=[], i=1 cycle=[1, 5, 4]
cls=[], i=1 cycle=[1, 5, 4, 7]
cls=[[7, 4, 5, 1]], i=2 cycle=[]
cls=[[7, 4, 5, 1]], i=2 cycle=[]
cls=[[7, 4, 5, 1]], i=2 cycle=[2]
cls=[[7, 4, 5, 1]], i=2 cycle=[2, 6]
cls=[[7, 4, 5, 1]], i=2 cycle=[2, 6, 9]
cls=[[7, 4, 5, 1], [9, 6, 2]], i=3 cycle=[]
cls=[[7, 4, 5, 1], [9, 6, 2]], i=3 cycle=[]
cls=[[7, 4, 5, 1], [9, 6, 2]], i=3 cycle=[3]
cls=[[7, 4, 5, 1], [9, 6, 2]], i=3 cycle=[3, 8]

cycles=[[7, 4, 5, 1], [9, 6, 2], [8, 3]]

A cool story about my migration from notion to i3

This a post about my migration from my own fork of notion to a i3-gaps and porting ion3-specific features like multiwindow scratchpads, etc. In this article you will probably see a lot of semi-stupid pythonish hacks because of I am new to python.

[Read more]

zsh-builtin xargs

Of course all of you already knows about xargs: nice cli-mode tool to execute command lines from standard input. As you know some tools can get input as a parameter like awk or grep, but some like cp or 7z can’t. Here I shall talk about xargs and one of zsh-builtin replacement of it. If you are interested please read further.

[Read more]

Filenames and pathnames in shell

Interesting article about handling paths and filenames in shell:

Look at this quote from there:

Encoding pathnames It is possible to encode pathnames so that all pathnames can be handled. There is no standard POSIX mechanism for doing this encoding, unfortunately. encodef is a small utility I wrote that can encode and decode filenames in a few formats. With it, you can do this:

# This version is POSIX portable; in practice
# you can often use "-print0" instead of "-exec printf '%s\0' {} \;"
for encoded_pathname in $(find . -exec printf '%s\0' {} \; | encodef ) ; do
    file="$(encodef -d -Y -- "$encoded_pathname")" ; file="${file%Y}"
    COMMAND "$file" # Use quoted "$file", not $file, everywhere.