Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / etcportagepatchesx11-driversnvidia-drivers-334.16kernel313.patch
Created Feb 19, 2014
/etc/portage/patches/x11-drivers/nvidia-drivers-334.16/kernel313.patch
View etcportagepatchesx11-driversnvidia-drivers-334.16kernel313.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
View 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 Aug 29, 2015
pwmdev kernel driver
View pwmdev.c
#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 Apr 13, 2014
xcompcap-main.cpp.E
View 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;
@BtbN
BtbN / main.xml
Created May 16, 2014
DrawerLayout
View main.xml
<?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" />
View copy_on_debug_helper.cmake
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()
View autostart_xbmc
#!/bin/bash
cd "${HOME}"
if [ -z "$VNCDESKTOP" ]; then
echo "yes" > ~/.restart_xbmc
while [ -f ~/.restart_xbmc ]; do
sleep 5
xbmc
done
fi
View 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);
View 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"