Skip to content

Instantly share code, notes, and snippets.

View mnem's full-sized avatar

Dave Clayton-Wagner mnem

View GitHub Profile
@mnem
mnem / README.md
Last active August 29, 2015 14:07
PixiJS WebGL Graphics Test

Simple PixiJS graphics test to see what works on mobile. Uses the set-background-to-black hack as mentioned in issue #938.

@mnem
mnem / README.md
Last active January 3, 2017 09:14
Influence Maps
@mnem
mnem / silencio.rb
Created October 7, 2014 10:53
Preventing mkmf littering with log files
require 'mkmf'
# Make the MakeMakefile logger write file output to null.
# Probably requires ruby >= 1.9.3
module MakeMakefile::Logging
@logfile = File::NULL
end
@mnem
mnem / fibonacci_limits.c
Created February 23, 2014 01:08
Quick and dirty calculator for the largest fibonacci sequence number which can be held in common integer widths and in a JavaScript Number. Likely only compiles on a 64 bit machine with a reasonably modern gcc or clang.
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
// Uses the fibonacci sequence defined
// in http://oeis.org/A000045
__uint128_t fib(__uint128_t n) {
if (n == 0) {
return 0;
iOS release build
Eigen additions 375
Eigen multiplications 1258
GLM additions 620
GLM multiplications 767
CML additions 397
CML multiplications 3029
@mnem
mnem / game_dev_links.md
Last active December 15, 2023 22:38
Some game dev links that I should probably keep note of.
@mnem
mnem / install_all_the_things.sh
Last active September 7, 2016 21:03
Things to install on a fresh Mac: bash <(curl -fsSL https://gist.github.com/mnem/6560977/raw/install_all_the_things.sh)
#!/usr/bin/env bash
function execute_after_confirm {
read -p "$1 ($2) ? [y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
shift
for var in "$@"
do
@mnem
mnem / ConEmu.xml
Last active January 20, 2019 09:22
My ConEmu.xml file. See comment for further details and how to install. To find out more about ConEmu, see: https://code.google.com/p/conemu-maximus5/
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2013-08-29 11:28:09" build="130827">
<value name="ColorTable00" type="dword" data="00000000"/>
<value name="ColorTable01" type="dword" data="00ee0000"/>
<value name="ColorTable02" type="dword" data="0000cd00"/>
<value name="ColorTable03" type="dword" data="00cdcd00"/>
<value name="ColorTable04" type="dword" data="000000cd"/>
<value name="ColorTable05" type="dword" data="00cd00cd"/>
@mnem
mnem / Main.as
Last active December 17, 2015 08:28
Not sure if bug, or just user error.
package
{
import ash.core.Engine;
import ash.core.Entity;
import flash.display.Sprite;
public class Main extends Sprite
{
@mnem
mnem / CommandConnection.as
Created April 24, 2013 17:51
Simple local TCP line command listener thungumy.
/**
* Copyright
*/
package org.tryharder.levelup2013
{
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.ServerSocketConnectEvent;
import flash.net.ServerSocket;
import flash.net.Socket;