Skip to content

Instantly share code, notes, and snippets.

View TauPan's full-sized avatar
🏠
Working from home

Friedrich Delgado TauPan

🏠
Working from home
View GitHub Profile
@TauPan
TauPan / clipboard
Created February 24, 2011 13:00
clipboard extension for urxvt (updated)
#! /usr/bin/perl
# adapted from https://wiki.archlinux.org/index.php/Rxvt-unicode#Automatic_Script_Management
sub on_sel_grab {
my ($term, $time) = @_;
my $query = $term->selection;
$term->selection_grab ($time, 1);
$term->selection($query, 1);
return 0;
}
> GIT_CURL_VERBOSE=1 git fetch company
* Couldn't find host intern.company.com in the .netrc file; using defaults
* About to connect() to intern.company.com port 443 (#0)
* Trying xxx.xxx.xxx.xxx... * Connected to intern.company.com (xxx.xxx.xxx.xxx) port 443 (#0)
* found 2 certificates in /home/user/secret/company-cachain.pem
* gnutls_handshake() failed: A TLS warning alert has been received.
* Closing connection #0
* Couldn't find host intern.company.com in the .netrc file; using defaults
* About to connect() to intern.company.com port 443 (#0)
* Trying xxx.xxx.xxx.xxx... * Connected to intern.company.com (xxx.xxx.xxx.xxx) port 443 (#0)
@TauPan
TauPan / screen-select-or-run.sh
Created March 31, 2011 21:50
screen-select-or-run.sh
#!/bin/sh
# arguments:
# $1: title (mandatory)
# $2: program to run, no quotes in here! (mandatory)
# $3: explicit arguments to screen, you have to add -t title here yourself! (optional)
# $4: desired number for the new screen (optional)
# $5: screen command (!) to run, if already selected, e.g. eval 'stuff foo' (optional)
# use via e.g.:
# bind m screen screen-select-or-run mutt mutt
@TauPan
TauPan / MarUseCases.dot
Created June 22, 2011 12:41
Why the heck does dot rasterize actor.svg when I process this with dot -Tsvg MarUseCases.dot -o MarUseCases.svg ???!!!oneeleventy
digraph example {
rankdir=LR;
bgcolor="#eeeeff";
node [fontname=Arial, fontsize=10];
edge [color=red, style=bold, fontsize=9];
// Actors
{
node [shape=custom, shapefile="actor.svg",
width=.352, height=0.77, fixedsize=true,
@TauPan
TauPan / s4-warnings
Created July 15, 2011 13:14
Warnings from compiling nano's s4-test branch of xmms2
/home/fdf/opt/anon-vc/xmms2/src/lib/s4/src/tools/s4/main.y: In function ‘yyparse’:
/home/fdf/opt/anon-vc/xmms2/src/lib/s4/src/tools/s4/main.y:125:5: warning: passing argument 1 of ‘add_or_del’ from incompatible pointer type [enabled by default]
/home/fdf/opt/anon-vc/xmms2/src/lib/s4/src/tools/s4/main.y:34:13: note: expected ‘int (*)(struct s4_t *, struct s4_transaction_t *, const char *, const struct s4_val_t *, const char *, const struct s4_val_t *, const char *)’ but argument is of type ‘int (*)(struct s4_transaction_t *, const char *, const struct s4_val_t *, const char *, const struct s4_val_t *, const char *)’
/home/fdf/opt/anon-vc/xmms2/src/lib/s4/src/tools/s4/main.y:128:5: warning: passing argument 1 of ‘add_or_del’ from incompatible pointer type [enabled by default]
/home/fdf/opt/anon-vc/xmms2/src/lib/s4/src/tools/s4/main.y:34:13: note: expected ‘int (*)(struct s4_t *, struct s4_transaction_t *, const char *, const struct s4_val_t *, const char *, const struct s4_val_t *, const char *)’ but argument i
@TauPan
TauPan / gist:1084654
Created July 15, 2011 13:19
xmmsclient+ build error with nano's s4-test branch
[ 36/379] cxx: src/clients/lib/xmmsclient++/client.cpp -> _build_/default/src/clients/lib/xmmsclient++/client_1.o
In file included from ../src/include/xmmsclient/xmmsclient++/result.h:23:0,
from ../src/include/xmmsclient/xmmsclient++/bindata.h:22,
from ../src/clients/lib/xmmsclient++/bindata.cpp:18:
../src/include/xmmsclient/xmmsclient++/coll.h:53:29: error: ‘XMMS_COLLECTION_TYPE_QUEUE’ was not declared in this scope
../src/include/xmmsclient/xmmsclient++/coll.h:54:29: error: ‘XMMS_COLLECTION_TYPE_PARTYSHUFFLE’ was not declared in this scope
In file included from ../src/include/xmmsclient/xmmsclient++/bindata.h:22:0,
from ../src/clients/lib/xmmsclient++/bindata.cpp:18:
../src/include/xmmsclient/xmmsclient++/result.h: In static member function ‘static Xmms::CollPtr Xmms::CollResult::createColl(xmmsv_coll_t*)’:
../src/include/xmmsclient/xmmsclient++/result.h:438:11: error: ‘XMMS_COLLECTION_TYPE_QUEUE’ was not declared in this scope
@TauPan
TauPan / gist:1084748
Created July 15, 2011 14:02
xmms2d.log
fdf@orion:~> tail -n 30 ~/.cache/xmms2/xmms2d.log 16:01
14:40:05 INFO: ../src/xmms/xform.c:1476: Successfully setup chain for 'file:///usr/share/xmms2/silence-cellule_snippet.ogg' (1) containing gvfs:magic:vorbis:segment
14:41:16 INFO: ../src/xmms/log.c:55: Logging says bye bye :)
--- Starting new xmms2d ---
INFO: ../src/xmms/log.c:49: Initialized logging system :)
15:23:15 INFO: ../src/xmms/ipc.c:818: IPC listening on 'unix:///tmp/xmms-ipc-fdf'.
params.c:OpenConfFile() - Unable to open configuration file "/home/fdf/.smb/smb.conf":
Datei oder Verzeichnis nicht gefunden
params.c:OpenConfFile() - Unable to open configuration file "/home/fdf/.smb/smb.conf.append":
@TauPan
TauPan / problems.log
Created July 19, 2011 08:37
valgrind --tool=none --log-file=problems.log xmms2d -v
==16396== Nulgrind, the minimal Valgrind tool
==16396== Copyright (C) 2002-2010, and GNU GPL'd, by Nicholas Nethercote.
==16396== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==16396== Command: xmms2d -v
==16396== Parent PID: 23835
==16396==
--16396-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x2a
valgrind: m_debuginfo/readdwarf.c:2338 (copy_convert_CfiExpr_tree): Assertion 'srcix >= 0 && srcix < VG_(sizeXA)(srcxa)' failed.
==16396== at 0x3806A9D6: ??? (in /usr/lib/valgrind/none-amd64-linux)
@TauPan
TauPan / xmms2continue.sh
Created July 20, 2011 09:52
extremely dirty first shell version of xmms2continue
#!/bin/bash
searchterm=$(echo $(curl http://ws.audioscrobbler.com/1.0/user/TauPan/recenttracks.rss|grep -A1 item|grep title|head -1|sed -e 's/<title>\(.*\)<\/title>/\1/'|tr -dc \ A-z0-9))
artist=$(echo $(xmms2 search $searchterm -l artist|tail -2|head -1))
album=$(echo $(xmms2 search $searchterm -l album|tail -2|head -1))
title=$(echo $(xmms2 search $searchterm -l title|tail -2|head -1))
xmms2 stop
xmms2 clear
xmms2 add artist:"$artist" album:"$album" -o "artist date tracknr"
xmms2 jump $title
xmms2 play
@TauPan
TauPan / backtrace and full backtrace for all threads
Created July 21, 2011 11:10
coredump from trying to play album of ogg files
Thread 10 (Thread 11588):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1 0x0000000000432301 in xmms_ringbuf_wait_used (ringbuf=0x20b3150, len=4096, mtx=0x20b3120) at ../src/xmms/ringbuf.c:405
#2 0x00000000004207ed in xmms_output_read (output=0x20b3010, buffer=0x7ffb5f402e90 "", len=4096) at ../src/xmms/output.c:531
#3 0x0000000000439a85 in xmms_output_plugin_writer (data=0x84f1e0) at ../src/xmms/outputplugin.c:456
#4 0x00007ffb785a8cf6 in g_thread_create_proxy (data=0x1ef99b0) at /tmp/buildd/glib2.0-2.28.6/./glib/gthread.c:1897
#5 0x00007ffb77d17b40 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6 0x00007ffb77a632fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7 0x0000000000000000 in ?? ()