Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
PREFIX=$HOME/wayland-install
aptitude update
aptitude install build-essential autoconf automake libtool libpthread-stubs0-dev git-core libx11-dev x11proto-dri2-dev x11proto-gl-dev libxext-dev libxxf86vm-dev libxdamage-dev libxfixes-dev libexpat1-dev libxt-dev libxi-dev libxmu-dev libudev-dev libgl1-mesa-dev libx11-xcb-dev libxcb-render0-dev libpng-dev libpixman-1-dev python libffi-dev libgdk-pixbuf-dev libglib2.0-dev libpoppler-glib-dev
aptitude build-dep mesa
wget http://cgit.freedesktop.org/mesa/drm/snapshot/drm-2.4.15.tar.gz
tar -xzf drm-2.4.15.tar.gz
/*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
/**
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
/*
step.c
Program to verify new algorithm for linear acceleration.
Author: Pramod Ranade <pramod.ranade@spjsystems.com>
*/
#include <stdio.h>
#include <io.h>
#include <stdlib.h>
@tmpvar
tmpvar / TLC5971 breakout.jpg
Created October 11, 2012 23:13
arduino uno control of of a TLC5971 rgb led driver
TLC5971 breakout.jpg
@tmpvar
tmpvar / dda-cursor.h
Last active April 25, 2022 17:36
Branchless 3D DDA cursor
#include <glm/glm.hpp>
using namespace glm;
struct DDACursor {
vec3 mask;
vec3 mapPos;
vec3 rayStep;
vec3 rayDir;
vec3 rayPos;
vec3 sideDist;
@tmpvar
tmpvar / svg2gcode.js
Created February 10, 2012 23:26
stupid easy line based svg to gcode converter
// The intention here is that you load up the svg in a browser and run the following
// in the console
var
s = 1,//-0.35,
cz = 144, // cut z
sz = 142, // safe z
materialWidth = 6, // in mm
passes = 3,
passWidth = materialWidth/passes,
@tmpvar
tmpvar / my-first-module.md
Last active December 20, 2021 18:48
how to create your very first node.js module and publish it to the npm registry

building your first node module

This is pretty simple, lets dive in!

choose a name

Find a name that isn't taken and clearly describes what your module is doing

$ npm view your-first-node-module
@tmpvar
tmpvar / motor.c
Created November 29, 2012 05:39
// Demo program for stepper motor control with linear ramps
// Hardware: PIC18F252, L6219
#include "18F252.h"
// PIC18F252 SFRs
#byte TRISC = 0xf94
#byte T3CON = 0xfb1
#byte CCP2CON = 0xfba
#byte CCPR2L = 0xfbb
#byte CCPR2H = 0xfbc
@tmpvar
tmpvar / evaluate-cpu.cpp
Created September 27, 2021 07:47
single threaded cpu based sdf -> octree evaluator
// a single threaded SDF->octree evaluator on the cpu.
#pragma CFLAGS=-I ../../include -march=native
#include <stdio.h>
#include <glm/glm.hpp>
#include <types.h>
using namespace glm;