Skip to content

Instantly share code, notes, and snippets.

@inkarkat
inkarkat / Xtightvnc-stacktrace_20210121-192418
Last active January 22, 2021 10:29
Xtightvnc 1.3.10-0ubuntu3 crash on Ubuntu 16.04
$ *** Error in `Xtightvnc': free(): invalid pointer: 0x000000000085ea78 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777f5)[0x7f414c1127f5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8038a)[0x7f414c11b38a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f414c11f58c]
Xtightvnc(miSetShape+0x28f)[0x53fb6f]
Xtightvnc[0x540dee]
Xtightvnc[0x54102a]
Xtightvnc(Dispatch+0x1d0)[0x437a70]
Xtightvnc(main+0x7f5)[0x41e735]
javascript:(function%20(){/*%20https://gist.github.com/inkarkat/cd1d40996a1f818dfc71%20*/function%20ls(u,c){var%20h=document.getElementsByTagName("head")[0];var%20s=document.createElement("script");s.src=u;var%20d=false;s.onload=s.onreadystatechange=function%20(){if(!d&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){d=true;c();s.onload=s.onreadystatechange=null;h.removeChild(s);}};h.appendChild(s);}var%20$;var%20loc=location.href;var%20anchorPos=location.href.lastIndexOf('#');if(anchorPos>-1){loc=loc.substring(0,anchorPos);/*%20if%20already%20has%20an%20anchor,%20it%20needs%20to%20be%20replaced%20*/}function%20a(n,t){return%20'<a%20href="'+loc+'#'+n+'"%20title="'+t+':%20'+n+'"%20style="margin:0;padding:0;"><img%20src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGdSURBVDjLpVMxa8JAFL6rAQUHXQoZpLU/oUOnDtKtW/MDBFHHThUKTgrqICgOEtd2EVxb2qFkKTgVChbSCnZTiVBEMBRLiEmafleCDaWxDX3w8e7dve+7l3cv1LZt8
@inkarkat
inkarkat / SortUnfolded.vim
Created November 25, 2012 21:39
A sort function for Vim that keeps folded lines intact.
":[range]SortUnfolded[!] [i][u][r][n][x][o] [/{pattern}/]
" Sort visible lines in [range]. Lines inside closed folds
" are kept intact; sorting is done only on the first line
" of the fold; the other lines inside the fold move with
" it as a unit.
" Copyright: (C) 2012 Ingo Karkat
" The VIM LICENSE applies to this scriptlet; see ':help copyright'.
" Inspiration:
" http://stackoverflow.com/questions/13554191/sorting-vim-folds
function! s:ErrorMsg( text )
@inkarkat
inkarkat / todo.txt%20final%20filter
Created January 21, 2011 09:01 — forked from ginatrapani/todo.txt final filter
Specially colorizes priority, date and project.
#!/bin/bash
export COLOR_CONTEXT=$GREEN
export COLOR_PROJECT=$RED
export COLOR_DATE=$LIGHT_GREEN
# Force gawk to behave posixly. Comment out if you get an error about
# no such option -W.
# AWK_OPTIONS="-W posix"
if [ "$TODOTXT_PLAIN" -eq "0" ]; then
awk $AWK_OPTIONS '
function highlight(colorVar, color) {