Skip to content

Instantly share code, notes, and snippets.

@romanlarionov
romanlarionov / matrix.h
Created July 2, 2018 18:43
Single header file for templated matrices.
#ifndef _MATRIX_H
#define _MATRIX_H
#include <cmath>
#include <algorithm>
#include <cstring>
#include "vector.h"
@romanlarionov
romanlarionov / vector.h
Last active January 16, 2019 00:44
Single header file for templated vectors.
#ifndef _VECTOR_H
#define _VECTOR_H
#include <iostream>
#include <cmath>
template <class t>
struct Vec4;
@romanlarionov
romanlarionov / CMakeLists.txt
Last active August 11, 2019 17:15
OpenGL Context Creation Template
cmake_minimum_required(VERSION 2.6)
project(OpenGL_APP)
option(GLFW_BUILD_DOCS OFF)
option(GLFW_BUILD_EXAMPLES OFF)
option(GLFW_BUILD_TESTS OFF)
add_subdirectory(deps/glfw)
include_directories("deps/glfw/include"
"deps/glad/include/")
@romanlarionov
romanlarionov / bark.sh
Last active October 7, 2016 01:12
Makes a computer bark.
#!/bin/bash
if [[ "$(lsb_release -si)" == "Ubuntu" ]]; then
sudo apt-get -qq - y install gnustep-gui-runtime
fi
while :
do
say "bark"
done
@romanlarionov
romanlarionov / pi.md
Last active March 29, 2016 01:02
Setting up Raspberry Pi VPN for local network access
@romanlarionov
romanlarionov / dogs.markdown
Last active August 29, 2015 14:27 — forked from clifff/dogs.markdown
dog gifs

@romanlarionov
romanlarionov / gist:07b48c14634cce6d4237
Last active August 29, 2015 14:11
Point Cloud Rendering Script
<html>
<head>
<!-- you can include other scripts here -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/three.js/r69/three.js"></script>
<script src="http://threejs.org/examples/js/controls/TrackballControls.js"></script>
<script src="papertowel.json"></script>
</head>
<body>
<script>
@romanlarionov
romanlarionov / gist:23ed26ad6964ad8dfce7
Last active August 29, 2015 14:11
PCL Compile Instructions
* Remember to install NDK and create a standalone toolchain from that *
https://gist.github.com/Tydus/11109634
* Remember to add in install of OpenGL dev headers on Ubuntu *
``` bash
$ sudo apt-get install libpng-dev libjpeg-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
$ sudo apt-get install mesa-common-dev
$ sudo apt-get install libpthread-stubs0-dev libgl1-mesa-dev libx11-dev libxrandr-dev libfreetype6-dev libglew1.5-dev libjpeg8-dev libsndfile1-dev libopenal-dev
@romanlarionov
romanlarionov / gist:9632797
Last active August 29, 2015 13:57
Script for making player face the direction of the mouse cursor.
using UnityEngine;
using System.Collections;
public class LookAtMouse : MonoBehaviour {
// speed is the rate at which the object will rotate
public float speed;
void FixedUpdate () {