Skip to content

Instantly share code, notes, and snippets.

View demonixis's full-sized avatar

Yannick Comte demonixis

View GitHub Profile
@rpavlik
rpavlik / 99-sensics-usb.rules
Created January 11, 2016 23:24
udev rules for sensics HMDs
# udev file for USB interfaces on Sensics-based HMDs and emulated devices
###
# Section to permit access to HID streaming
###
# OSVR HDK (via HIDAPI/libusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0b00", MODE="0660", GROUP="plugdev"
@flarb
flarb / SDKSwap.cs
Created May 23, 2015 18:50
Swap between Unity3D Google Cardboard and Gear VR / OVR Mobile SDKs. It swaps out the Android manifest files when you switch platforms--pretty much all you need (aside from wrapping the APIs) to switch platforms.
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
public class SDKSwap : EditorWindow {
static string _cardboardPath;
static string _OVRPath;
@tgjones
tgjones / YourProject.csproj
Last active August 17, 2021 08:43
Automatically adding MonoGame XNBs into an assembly as Embedded Resources
<Target Name="BeforeBuild" DependsOnTargets="BuildContent">
<ItemGroup>
<!-- Include just-built XNB files as embedded resources in output assembly -->
<EmbeddedResource Include="@(ExtraContent)">
<LogicalName>Apollo.Resources.Compiled.$([System.String]::new('%(RecursiveDir)').Replace('\', '.'))%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
<!-- Don't copy XNB files to output directory -->
<Content Remove="@(ExtraContent->'$(ParentOutputDir)\%(RecursiveDir)%(Filename)%(Extension)')" Condition="$(MonoGamePlatform) != 'Android'" />
<AndroidAsset Remove="@(ExtraContent->'$(ParentOutputDir)\%(RecursiveDir)%(Filename)%(Extension)')" Condition="$(MonoGamePlatform) == 'Android'" />
@McFunkypants
McFunkypants / gist:87f07ac5e8affad34391
Last active March 19, 2024 12:10
Sid Meier's 10 Rules of Game Design
Sid Meier's 10 Rules of Game Design
1. Choose a topic you have a passion for. Game Design is about creativity.
2. Do research after the game is done. Tap into the player’s brain.
3. Define your axioms, refine your axioms. Prototype, prototype, prototype; sit in all the chairs.
4. Double it or cut it in half. You are more wrong than you think.
@flarb
flarb / VRInputModule.cs
Created August 20, 2014 22:27
Lets you use a VR world space cursor with World Space Canvases in Unity3D 4.6. Add this to the EventSystem object. Put some box colliders on your buttons in the World Space Canvas. Then, do a trace to see if you're looking at a menu object--if the trace hits one of those buttons, pass it to SetTargetObject. See ralphbarbagallo.com for a longer e…
using UnityEngine;
using UnityEngine.EventSystems;
//by Ralph Barbagallo
//www.flarb.com
//www.ralphbarbagallo.com
//@flarb
public class VRInputModule : BaseInputModule {
@flibitijibibo
flibitijibibo / FNAWindowExample.cs
Last active April 30, 2022 15:21
Example to hook up an SDL2 window to a Panel for use in a System.Windows.Forms window
#region License
/* FNA GameWindow for System.Windows.Forms Example
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
#endregion
@Twinklebear
Twinklebear / main.cpp
Last active February 18, 2024 02:28
Example of render to texture with SDL2
#include <iostream>
#ifdef __linux__
#include <SDL2/SDL.h>
#elif defined(_WIN32)
#include <SDL.h>
#endif
const int WIN_WIDTH = 640;
const int WIN_HEIGHT = 480;
@ianbarber
ianbarber / DotView.java
Created September 6, 2013 13:47
An Android view that responds to gamepad events
package com.riskcompletefailure.happydot;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@andycole
andycole / .gitconfig
Last active January 11, 2023 09:26
My git config
## Basic colours
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
[color "branch"]
current = yellow bold