Skip to content

Instantly share code, notes, and snippets.

@attrition
attrition / simple-git-branching-model.md
Created August 11, 2017 21:24 — forked from chalasr/simple-git-branching-model.md
a simple git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@attrition
attrition / Program.cs
Last active December 15, 2015 20:59
Read in ascii topology data and extract a square chunk centred around a given latitude and longitude (code provides ottawa and montreal targets). Expects 30 arc-second map of canada.
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace AscMapSubset
{
static class Program
{
@attrition
attrition / index.html
Last active December 15, 2015 13:28
Simple "Lights Out!" clone for March 2013 #OneGameAMonth.
<html>
<body id="body">
<div id="main_area">
<canvas id="canvas" width="700" height="700"></canvas>
<h1>Lights Out! Clone</h1>
<p>
New Game:
<input type="button" value="Easy" onClick="newGame(0);" />
<input type="button" value="Medium" onClick="newGame(1);" />
<input type="button" value="Hard" onClick="newGame(2);" />
@attrition
attrition / .gitignore
Created March 26, 2013 01:08
Basic .gitignore for Unity
## Unity
# Ignore The following directories / file extensions
Library
Temp
# Ignore the following file extensions
*.exe
*.vcproject
*.sln
*.csproj
array<Vector3>^ ParticleReadData::GetPositionBuffer()
{
// get array of vectors, treat them as array of floats
const PxVec3* p1 = this->UnmanagedPointer->positionBuffer.ptr();
float* p = (float*)p1;
if (p1 == NULL)
return nullptr;
int n = this->UnmanagedPointer->numValidParticles;
@attrition
attrition / SceneChaseCamera.cs
Created May 4, 2012 15:31
Unity3D Scene View Chase Camera
using UnityEngine;
using UnityEditor;
public class SceneChaseCam : EditorWindow
{
bool active = false;
bool followSelection = false;
Transform toFollow;
// Add menu named "Scene Chase Cam" to the Window menu