Skip to content

Instantly share code, notes, and snippets.

View praeclarum's full-sized avatar

Frank A. Krueger praeclarum

View GitHub Profile
@praeclarum
praeclarum / ListDiff.cs
Last active March 31, 2018 03:41
Computes a diff between two different IEnumerables. It's better than anything you have ever seen. Ever.
using System;
using System.Collections.Generic;
namespace Praeclarum
{
/// <summary>
/// The type of <see cref="ListDiffAction{S,D}"/>.
/// </summary>
public enum ListDiffActionType
{
@praeclarum
praeclarum / SpeedTestController.cs
Created July 18, 2012 17:08
Test used to measure the performance of SQLite-net
using System;
using MonoTouch.UIKit;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Runtime.Serialization;
@praeclarum
praeclarum / gist:3124006
Created July 16, 2012 17:51
Relational to Object Mapping
@praeclarum
praeclarum / DLKevin.cs
Created April 7, 2012 16:34
Downloads Kevin's music from SoundCloud
using System;
using System.Net;
using System.IO;
namespace DLKevin
{
class App
{
public static void Main (string[] args)
{
@praeclarum
praeclarum / UIKitExportEnv.cs
Created February 9, 2012 00:01
Sometimes, exporting images isn't easy
public class UIKitExportEnv : ExportEnv
{
public UIKitExportEnv (string name, Model model)
: base (name, model)
{
}
protected override void WriteTexture (ITexture texture, ExportedFile file)
{
var width = texture.Width;
@praeclarum
praeclarum / n3mtodae.c
Created January 21, 2012 06:55
Converts Nokia 3D models to DAE models (http://maps3d.svc.nokia.com/webgl/index.html)
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
struct xyz
{
float x, y, z;
@praeclarum
praeclarum / CodeShareReport.cs
Created January 13, 2012 20:42
Computes the code share stats for the iCircuit project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
namespace CodeShareReport
{
class App
@praeclarum
praeclarum / Cutter.cs
Created November 9, 2011 11:44
App to perform CNC cuts using interval arithmetic and voxels in an adaptive octree
using System;
using System.IO;
namespace Cutter
{
class MainClass
{
const float Precision = 0.02f;
const float CutterStep = 0.1f;
@praeclarum
praeclarum / ListDiff.cs
Created November 5, 2011 14:42
Finds a diff between two IEnumerables
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace Algorithms
{
/// <summary>
/// The type of <see cref="ListDiffAction{S,D}"/>.
@praeclarum
praeclarum / extract.js
Created October 26, 2011 23:27
Parses V8 source code to look for JavaScript globals
console.log("<!DOCTYPE html>");
console.log("<html>");
console.log("<head>");
console.log("<title>JavaScript Reference</title>");
console.log("</head>");
console.log("<body>");
var fs = require("fs");
var FILES = ["apinatives.js",