Skip to content

Instantly share code, notes, and snippets.

View bl4ckb0ne's full-sized avatar

Simon Zeni bl4ckb0ne

  • Collabora
  • Canada
View GitHub Profile
@digitaljhelms
digitaljhelms / gist:3099010
Created July 12, 2012 15:58
Squash the first two commits in a git repository's history

The scenario

Your repository has two commits:

$ git log --oneline
957fbfb No, I am your father.
9bb71ff A long time ago in a galaxy far, far away....
#define GLEW_STATIC
#include "GL/glew.h"
#include "GL/glfw3.h"
#include "glm/ext.hpp"
#include "glm/glm.hpp"
#include <cstdlib>
#include <functional>
#include <iostream>
@snipe
snipe / gist:5512408
Created May 3, 2013 18:25
ASCII Goatse
* g o a t s e x * g o a t s e x * g o a t s e x *
g g
o / \ \ / \ o
a| | \ | | a
t| `. | | : t
s` | | \| | s
e \ | / / \\\ --__ \\ : e
x \ \/ _--~~ ~--__| \ | x
* \ \_-~ ~-_\ | *
g \_ \ _.--------.______\| | g
@mbohun
mbohun / howto.md
Last active September 26, 2021 23:22
intel HD 4400 (Haswell) vulkan how to

2016-05-09

git clone git://anongit.freedesktop.org/mesa/mesa mesa.git
mkdir mesa_build
cd mesa_build
../mesa.git/configure --with-dri-drivers=i965 --with-gallium-drivers=  --with-vulkan-drivers=intel --with-egl-platforms=x11,drm
make
export VK_ICD_FILENAMES="src/intel/vulkan/dev_icd.json"

TODO: where is vulkaninfo binary?
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@onidev
onidev / masterpassword.cpp
Created April 14, 2017 19:09
Master Password
// CLI for http://masterpasswordapp.com/algorithm.html
// C core lib used: https://github.com/Lyndir/MasterPassword/
#include <iostream>
#include <cmath>
extern "C" {
#include "core/mpw-algorithm.h"
#undef enum
}
@DevHwan
DevHwan / vs2015_iob_func_fix.cpp
Created January 10, 2018 05:46
Visual Studio 2015 Legacy Link Error Fix : __imp__iob_fuc
////////////////////////////////////////////////////////////////////////////
//// stdin, stdout, stderr link error for vs2015
//// override implementation of __iob_func
//// https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2
#if ( _msc_ver >= 1900 )
#include <cstdio>
extern "c" file * __cdecl __iob_func(void)
{
struct _iobuf_vs2012 { // ...\microsoft visual studio 11.0\vc\include\stdio.h #56
char *_ptr;
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h