Skip to content

Instantly share code, notes, and snippets.

View Jerdak's full-sized avatar
💭
Rolling only 20s.

j.carson Jerdak

💭
Rolling only 20s.
  • 50' above the ground floating on an umbrella.
View GitHub Profile
@Jerdak
Jerdak / stlexport.py
Created October 31, 2014 01:49
cgkit stl exporter
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
@Jerdak
Jerdak / EchoSpheres.cs
Last active December 19, 2015 20:49
Unity multiple echo shader. Uses floating point -> pixel packing to support transmitting data from Unity component to the shader through a texture rather than as properties.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
[Serializable]
public class EchoSphere2 {
public enum ShaderPackingMode { Texture, Property };
public ShaderPackingMode CurrentPackingMode = ShaderPackingMode.Texture;
@Jerdak
Jerdak / MatrixNN.hpp
Last active December 20, 2015 08:39
c++11 concurrent thread test - Large NxN matrix multiplication.
#ifndef __MATRIXNN_H__
#define __MATRIXNN_H__
#include "thread_helpers.hpp"
#include <cstdio>
#include <cstring>
#include <random>
#include <vector>
class MatrixNN{
@Jerdak
Jerdak / .block
Last active May 8, 2017 19:07 — forked from mbostock/.block
Parallel Coordinates
license: gpl-3.0
# requires https://github.com/Rapptz/discord.py
# this snippet was scripted against discord.py v0.16.8 @ commit 7b806667cda6dc26b6a99d73473dcff5c2dd4044
import discord
import asyncio
import re
from types import ModuleType
sandbox = ModuleType('sandboxed_modules')
@Jerdak
Jerdak / CoroutineTracker.cs
Created January 24, 2014 20:48
Incomplete example of how to track Unity coroutines.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Coroutine tracker.
///
/// Custom handler for coroutines that tracks when they start and stop...
/// Uses Singleton class from: http://wiki.unity3d.com/index.php/Singleton
/// </summary>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Jerdak
Jerdak / FreeFormDeformer.cs
Created August 12, 2013 04:24
Example of free form deformation using Unity. Full package can be found in my main repository: https://github.com/Jerdak/FreeFormDeformation/tree/master/Unity
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Helper class that represents a parameterized vertex
/// </summary>
public class Vector3Param {
///bernstein polynomial packing
@Jerdak
Jerdak / screenshotty.py
Created November 8, 2013 01:22
OpenGL screenshots using python
#! /usr/bin/env python
'''
Simple example demonstrating how to take a screenshot
'''
import time
import sys
import os
import argparse
#OpenGL