Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / etcportagepatchesx11-driversnvidia-drivers-334.16kernel313.patch
Created February 19, 2014 10:13
/etc/portage/patches/x11-drivers/nvidia-drivers-334.16/kernel313.patch
diff -Naur work.orig/kernel/nv-linux.h work/kernel/nv-linux.h
--- work.orig/kernel/nv-linux.h 2014-02-12 16:10:19.316850127 +0100
+++ work/kernel/nv-linux.h 2014-02-12 16:21:56.236508230 +0100
@@ -273,7 +273,11 @@
#endif
#if !defined(NV_VMWARE) && defined(CONFIG_ACPI)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
#include <acpi/acpi.h>
+#else
@BtbN
BtbN / main.c
Created February 27, 2014 17:07
main.c
#include <assert.h>
#include <stdint.h>
#include <smmintrin.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#define CACHED_BUFFER_SIZE 4096
@BtbN
BtbN / pwmdev.c
Last active August 29, 2015 13:57
pwmdev kernel driver
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pwm.h>
#include <linux/stat.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <linux/types.h>
@BtbN
BtbN / xcompcap-main.cpp.E
Created April 13, 2014 23:20
xcompcap-main.cpp.E
This file has been truncated, but you can view the full file.
# 1 "/home/btbn/Projekte/obs-studio/plugins/linux-xcomposite/xcompcap-main.cpp"
# 1 "/home/btbn/Projekte/obs-studio/cmbuild//"
# 1 "<Kommandozeile>"
# 1 "/home/btbn/Projekte/obs-studio/plugins/linux-xcomposite/xcompcap-main.cpp"
# 1 "/home/btbn/Projekte/obs-studio/libobs-opengl/GL/gl_obs.h" 1
# 75 "/home/btbn/Projekte/obs-studio/libobs-opengl/GL/gl_obs.h"
# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/stddef.h" 1 3 4
# 150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/stddef.h" 3 4
@BtbN
BtbN / main.xml
Created May 16, 2014 02:07
DrawerLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/drawer_layout">
<FrameLayout android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
string(REGEX REPLACE "\\.(dll|exe)$" ".pdb" FNAME "${FNAME}")
if(CONFIG STREQUAL Debug OR CONFIG STREQUAL RelWithDebInfo)
file(COPY "${INPUT}/${FNAME}" DESTINATION "${OUTPUT}")
elseif(EXISTS "${OUTPUT}/${FNAME}")
file(REMOVE "${OUTPUT}/${FNAME}")
endif()
@BtbN
BtbN / autostart_xbmc
Created July 31, 2014 17:07
autostart_xbmc
#!/bin/bash
cd "${HOME}"
if [ -z "$VNCDESKTOP" ]; then
echo "yes" > ~/.restart_xbmc
while [ -f ~/.restart_xbmc ]; do
sleep 5
xbmc
done
fi
@BtbN
BtbN / error_test.cpp
Created August 30, 2014 23:02
error_test.cpp
/* compile with
gcc -ggdb -O0 -lssl -lcrypto -ldl -pthread -o ssltest error_test.cpp
*/
#include <openssl/ssl.h>
#include <dlfcn.h>
#include <pthread.h>
static void *lib = 0;
static int (*initfunc)(int,char**,char**);
static void (*endfunc)(void);
@BtbN
BtbN / stdin
Created September 5, 2014 14:11
stdin
test
@BtbN
BtbN / stdin
Created September 5, 2014 14:14
stdin
diff --git a/dev-qt/qtwidgets/qtwidgets-5.3.1-r2.ebuild b/dev-qt/qtwidgets/qtwidgets-5.3.1-r2.ebuild
index 208edc0..c080ff7 100644
--- a/dev-qt/qtwidgets/qtwidgets-5.3.1-r2.ebuild
+++ b/dev-qt/qtwidgets/qtwidgets-5.3.1-r2.ebuild
@@ -16,14 +16,14 @@ else
KEYWORDS="~amd64 ~x86"
fi
-IUSE="gles2 +opengl +png"
+IUSE="gles2 +opengl +png xcb"