Skip to content

Instantly share code, notes, and snippets.

View badosu's full-sized avatar

Amadeus Folego badosu

View GitHub Profile
@badosu
badosu / gist:cd7a018f7f7d45836903
Last active August 29, 2015 14:05
After destroy hook usage example for Sequel
require 'sequel'
require 'sqlite3'
DB = Sequel.connect 'sqlite:/'
DB.create_table?(:people) do
primary_key :id
String :name
foreign_key :address_id, :addresses
end
@badosu
badosu / $MYVIMRC
Last active August 29, 2015 14:06
A vim-dispatch handler for dvtm
let g:dispatch_handlers = [
\ 'tmux',
\ 'dvtm',
\ 'screen',
\ 'windows',
\ 'iterm',
\ 'x11',
\ 'headless',
\ ]
#0 0x00007ffff693976f in QMetaObject::changeGuard(QObject**, QObject*) () from /usr/lib/libQtCore.so.4
#1 0x00007ffff74ea77d in ?? () from /usr/lib/libQtGui.so.4
#2 0x00007ffff70eac08 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#3 0x00007ffff74ee72b in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#4 0x00007ffff70979ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#5 0x00007ffff709e56f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#6 0x00007ffff692128d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#7 0x00007ffff709dbcf in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#8 0x00007ffff7114b3a in ?? () from /usr/lib/libQtGui.so.4
#9 0x00007ffff711319c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
|--------------------------------------------------| 100% -
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff9f289700 (LWP 19802)]
0x00000000004de315 in BufferManager::acquire () at /home/badosu/Code/lmms/src/core/BufferManager.cpp:67
67 sampleFrame * b = s_available[ i ];
(gdb) backtrace
#0 0x00000000004de315 in BufferManager::acquire () at /home/badosu/Code/lmms/src/core/BufferManager.cpp:67
#1 0x0000000000528da4 in PlayHandle::doProcessing (this=0x8cdfde0) at /home/badosu/Code/lmms/src/core/PlayHandle.cpp:48
#2 0x000000000050501b in ThreadableJob::process (this=0x8cdfde0) at /home/badosu/Code/lmms/include/ThreadableJob.h:74
#3 0x000000000051cf33 in MixerWorkerThread::JobQueue::run (this=0x917100 <MixerWorkerThread::globalJobQueue>)
diff --git a/include/ExportFilter.h b/include/ExportFilter.h
new file mode 100644
index 0000000..857ed1b
--- /dev/null
+++ b/include/ExportFilter.h
@@ -0,0 +1,64 @@
+/*
+ * ExportFilter.h - declaration of class ExportFilter, the base-class for all
+ * file export filters
+ *
~/C/cxx2rs ❯❯❯ python2.7 --version
Python 2.7.9
~/C/cxx2rs ❯❯❯ rustc --version
rustc 1.0.0-nightly (ba2f13ef0 2015-02-04 20:03:55 +0000)
~/C/cxx2rs ❯❯❯ python2.7 ~/Code/cxx2rs/cxx2rs.py lv2 /usr/include/lv2.h
#![crate_type = "lib"]
#![crate_name = "ssh"]
extern crate libc;
#0 0x00007ffff4c9a9a9 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#1 0x00007ffff4ca2b56 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#2 0x00007ffff476a28d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#3 0x00007ffff4cce5f9 in ?? () from /usr/lib/libQtGui.so.4
#4 0x00007ffff4ca2bde in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#5 0x00007ffff476a28d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#6 0x00007ffff4d3b773 in ?? () from /usr/lib/libQtGui.so.4
#7 0x00007ffff4d3bc12 in ?? () from /usr/lib/libQtGui.so.4
#8 0x00007ffff4d1650f in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#9 0x00007ffff4d3e2e2 in ?? () from /usr/lib/libQtGui.so.4
@badosu
badosu / offlineimap.service
Last active August 29, 2015 14:16
offlineimap
[Unit]
Description=Sync imap with offlineimap
Requires=network.target
After=network.target
[Service]
Type=simple
User=badosu
Environment=DISPLAY=:0
ExecStart=/usr/bin/offlineimap-notify && sleep 10
Linking CXX executable zynaddsubfx
libzynaddsubfx_core.a(MiddleWare.cpp.o): In function `path_search(char const*)':
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:109: undefined reference to `lo_message_deserialise'
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:110: undefined reference to `lo_address_new_from_url'
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:112: undefined reference to `lo_send_message'
libzynaddsubfx_core.a(MiddleWare.cpp.o): In function `handler_function':
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:123: undefined reference to `lo_message_get_source'
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:125: undefined reference to `lo_address_get_url'
/home/badosu/Code/zynaddsubfx/src/Misc/MiddleWare.cpp:136: undefined reference to `lo_message_serialise'
libzynaddsubfx_core.a(MiddleWare.cpp.o): In function `MiddleWareImpl::bToUhandle(char const*)':
~/Code ❯❯❯ git clone git@github.com:fundamental/zynaddsubfx.git
Cloning into 'zynaddsubfx'...
^Tremote: Counting objects: 11923, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 11923 (delta 0), reused 0 (delta 0), pack-reused 11918
Receiving objects: 100% (11923/11923), 4.57 MiB | 401.00 KiB/s, done.
Resolving deltas: 100% (9611/9611), done.
Checking connectivity... done.
~/Code ❯❯❯ cd zynaddsubfx
~/C/zynaddsubfx ❯❯❯ mkdir build && cd build