Skip to content

Instantly share code, notes, and snippets.

View hypevhs's full-sized avatar

hypevhs

View GitHub Profile
@hypevhs
hypevhs / call.S
Last active August 29, 2015 14:10
calling C from assembly (64 bit)
.section .data
prompt: .asciz "Please input a number:\n"
format: .asciz "%d"
output: .asciz "The largest value is %d\n"
debug: .asciz "You gave me : '%d'!\n"
.section .text
.globl main
main:
movq $prompt, %rdi
movq $0, %rax
@hypevhs
hypevhs / jvr-bug-shader
Created January 2, 2015 22:05
JanusVR Linux QGL shader bug
QIODevice::read: device not open
QGLShader::compile(Fragment): 0:144(29): error: could not implicitly convert operands to arithmetic operator
0:144(37): error: operands to arithmetic operators must be numeric
0:144(37): error: no matching function for call to `sin(error)'; candidates are:
0:144(37): error: float sin(float)
0:144(37): error: float sin(float)
0:144(37): error: vec2 sin(vec2)
0:144(37): error: vec3 sin(vec3)
0:144(37): error: vec4 sin(vec4)
0:144(42): error: operands to arithmetic operators must be numeric
@hypevhs
hypevhs / jvr-bug-audioreset
Created January 13, 2015 03:37
JanusVR Linux Audio on Reset
Game::LoadBookmarks() - Loaded 17 bookmarks.
Game::LoadWorkspaces() - Loaded 4 workspace paths.
RiftRenderer() - Did not initialize, creating a debug version instead
Anisotropic filtering supported. Filtering set to x 16
MultiPlayerManager::DoSocketConnect() - trying "babylon.vrsites.com" 5566 ...
MumbleManager::initMumble() - shmfd pointer returned from shm_open < 0
Janus VR version: "34.1" Version online: "34.1" WebKit version: "538.1"
void MultiPlayerManager::SocketConnected()
Error: "GStreamer encountered a general stream error."
Error: "GStreamer encountered a general stream error."
QGLShader::compile(Fragment): 0:5(38): error: `iNormalWorld' undeclared
0:5(38): error: no matching function for call to `normalize(error)'; candidates are:
0:5(38): error: float normalize(float)
0:5(38): error: vec2 normalize(vec2)
0:5(38): error: vec3 normalize(vec3)
0:5(38): error: vec4 normalize(vec4)
0:8(14): error: `diffuseLight' undeclared
0:8(38): error: operands to arithmetic operators must be numeric
@hypevhs
hypevhs / jvr-bug-glxinfo
Created January 13, 2015 06:24
shader errors on this system
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
@hypevhs
hypevhs / gist:c5393af79a2f1f9b091c
Created June 2, 2015 03:12
chips challenge 2 packed map data
10x10 map, all empty
66 00 03 0A 0A 01 E3 01
0110011000000000000000110000101000001010000000011110001100000001
10x10 map, with a block in the top left hand corner
66 00 04 0A 0A 02 01 E2 01
011001100000000000000100000010100000101000000010000000011110001000000001
@hypevhs
hypevhs / gist:1999b3e7b94b2104424a
Created June 23, 2015 02:20
Basic GLSL SFML.Net skeleton
using SFML.Graphics;
using SFML.System;
using SFML.Window;
using System;
using System.Collections.Generic;
using System.Linq;
namespace OMGITSANAMESPACE
{
class Program
@hypevhs
hypevhs / Dockerfile
Created October 30, 2018 22:29
devkitPro arch linux development image (WIP)
#docker build -t "switchdev" ./switchdev
FROM archimg/base:full
MAINTAINER libjared
ENV DEVKITPRO /opt/devkitpro
ENV DEVKITARM /opt/devkitpro/devkitARM
ENV DEVKITPPC /opt/devkitpro/devkitPPC
RUN : \
&& pacman-key --recv F7FD5492264BB9D0 \
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4O//DRNdACgYSwSGSBse52ctkk89BE9lswo7Rg9jOWE7SOYR72WVsHbBDLCa0yfIIx8FNM1fOkbvSIuAlgprhDLkOGLad7slYlfZLmaPu1WjWgKaawhsKNSczacSQlf8CxLamdhbXLuj7gbCS4HnB6nsD5ozULwJvCmEd2NU4Lq/RavzRHgQ15cbsPx05TfRe0vPW+ACpYvu7BWlbpr7VA5UmF6Jw4l5HapQQDiGCyvXsF9OyfwLH1r8j5vm7+3pI8Z8f2CeBdp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