Skip to content

Instantly share code, notes, and snippets.

View m0ppers's full-sized avatar
🤦‍♂️
ouch

m0ppers

🤦‍♂️
ouch
View GitHub Profile
@jwinarske
jwinarske / appsink.cc
Last active March 5, 2024 04:43
gstreamer appsink vulkan sample
#include <gst/gst.h>
#include <gst/vulkan/vulkan.h>
#include <cstdlib>
int main(int argc, char* argv[]) {
GstElement *pipeline, *sink;
gint width, height;
GstSample* sample;
gchar* descr;
@wuhanstudio
wuhanstudio / qemu_armbian.sh
Last active April 14, 2024 21:44
Armbian on QEMU
# Install QEMU-6.1.0
wget https://download.qemu.org/qemu-6.1.0.tar.xz
tar xvJf qemu-6.1.0.tar.xz
cd qemu-6.1.0
./configure
make
sudo make install
# Download Armbian (Ubuntu Focal 20.04) for OrangePi PC
wget https://mirrors.netix.net/armbian/dl/orangepipc/archive/Armbian_21.08.1_Orangepipc_focal_current_5.10.60.img.xz
@jstepien
jstepien / Cargo.toml
Last active December 1, 2019 10:15
It All Looks the Same to Me
[package]
name = "bk"
version = "0.1.0"
authors = ["Jan Stępień"]
/**
* Bresenham Curve Rasterizing Algorithms
* @author Zingl Alois
* @date 17.12.2014
* @version 1.3
* @url http://members.chello.at/easyfilter/bresenham.html
*/
function assert(a) {
if (!a) console.log("Assertion failed in bresenham.js "+a);
@podgorskiy
podgorskiy / FrustumCull.h
Created July 12, 2017 10:33
Ready to use frustum culling code. Depends only on GLM. The input is only bounding box and ProjectionView matrix. Based on Inigo Quilez's code.
#include <glm/matrix.hpp>
class Frustum
{
public:
Frustum() {}
// m = ProjectionMatrix * ViewMatrix
Frustum(glm::mat4 m);
@aras-p
aras-p / prefix.shader
Created September 4, 2016 15:56
Prefix to compile Shadertoy shaders to Vulkan/SPIR-V
// pasting this in front of most shadertoys allows them to be compiled with:
// glslangValidator -V inputFile.frag -o outputFile.spv
#version 430
layout(binding = 1, std140) uniform glob {
uniform vec3 iResolution;
uniform float iGlobalTime;
uniform float iTimeDelta;
uniform int iFrame;
uniform float iFrameRate;
uniform float iChannelTime[4];
@brosner
brosner / gist:dbc092e3024f6a80149b
Last active October 18, 2017 11:00
trusty ACI image build without actool
# create ACI with trusty without actool due to bug https://github.com/coreos/rocket/issues/198
mkdir sleeper ; cd sleeper
debootstrap --verbose --variant=minbase --include=iproute,iputils-ping --arch=amd64 trusty rootfs
cat > app <<EOF
{
"acVersion": "1.0.0",
"acKind": "AppManifest",
"name": "sleeper",
"version": "1.0.0",
"os": "linux",
@hi2p-perim
hi2p-perim / ssecheck.cpp
Last active March 17, 2024 14:50
Check SSE/AVX instruction support.
/*
Check SSE/AVX support.
This application can detect the instruction support of
SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4a, SSE5, and AVX.
*/
#include <iostream>
#ifdef _MSC_VER
#include <intrin.h>
#endif