Skip to content

Instantly share code, notes, and snippets.

View mikezila's full-sized avatar

Not Important mikezila

View GitHub Profile
@mikezila
mikezila / BezierMesh.cs
Last active July 18, 2019 17:01
C# for Unity3D. Creates meshes from bezier patches. The resulting meshes are ready-to-render, including texture UVs.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class BezierMesh
{
public Mesh mesh;
public List<Vector2> uvs;
// Calculate UVs for our tessellated vertices
@mikezila
mikezila / TGALoader.cs
Created April 12, 2014 21:13
TGA Loader for Unity3D
// This was made by aaro4130 on the Unity forums. Thanks boss!
// It's been optimized and slimmed down for the purpose of loading Quake 3 TGA textures from memory streams.
using System;
using System.IO;
using UnityEngine;
public static class TGALoader
{
@mikezila
mikezila / govatar.go
Created August 6, 2014 21:25
Govatar - Avatar generator in Golang
// govatar.go
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"math/rand"
"os"
@mikezila
mikezila / life.go
Created August 29, 2014 00:22
Conway's Game of Life using OpenGL and Go
// Life.go
package main
import (
"fmt"
"github.com/go-gl/gl"
glfw "github.com/go-gl/glfw3"
"math/rand"
"runtime"
@mikezila
mikezila / 4chomp.go
Last active August 29, 2015 14:05
Rips 4chan thread content to a folder.
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"io"
"net/http"
"os"
"strings"
)
@mikezila
mikezila / grope.cs
Last active February 21, 2016 03:29
A simple grep clone that also shows line numbers.
using System;
namespace grope
{
class MainClass
{
public static void Main (string[] args)
{
if (args.Length == 0) {
Console.WriteLine ("Usage: grope searchTerm\nReceives input from stdin.");
@mikezila
mikezila / music-get.cs
Created January 29, 2016 01:16
Rip albums from khinsider's collection
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace music_get
{
static class Program
{
@mikezila
mikezila / Life.cs
Last active January 5, 2017 06:18
The Game of Life in C#. Nothing special. Wanted to try rendering something using GDI+ in winforms as simply as possible while still being fast. Abusing a Timer in this way is kind of nasty, but that coupled with unsafe bitmap drawing is actually pretty performant for simple things.
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace chip8
{
@mikezila
mikezila / life.c
Created January 23, 2017 01:38
Game of Life in C using OpenMP.
#include <stdlib.h>
#include <stdio.h>
#include "stopwatch.h"
#include <time.h>
#include <omp.h>
int wrappedLookup(int);
void seedGame(char *);
@mikezila
mikezila / AnimatedSpriteSheet.cs
Created February 26, 2017 21:49
SpriteSheet and AnimatedSpriteSheet classes for Monogame.
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace AdvancedWars
{
class AnimatedSpriteSheet
{
private string baseName;