Skip to content

Instantly share code, notes, and snippets.

View mhaemmerle's full-sized avatar

Marc Haemmerle mhaemmerle

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@rm-hull
rm-hull / boids.cljs
Last active December 26, 2015 11:39
Boids, originally written by Craig Reynolds in 1986, is an artificial live program which simulates flocking birds (but in this case just in 2D). It is an example of emergent behaviour; that is, the complexity of Boids arises from the interaction of individual agents adhering to a set of simple rules, (i) separation: steering to avoid crowding lo…
(ns boids
(:use [enchilada :only [canvas ctx value-of canvas-size]]
[jayq.core :only [show]]
[monet.core :only [animation-frame]]
[monet.canvas :only [save restore
begin-path move-to line-to close-path
stroke stroke-style fill fill-rect fill-style
rotate translate]]
[boids.rules :only [step make-boid]])
(:require [boids.vector :refer [heading]]))
@stevewoolcock
stevewoolcock / TurnSystem.cs
Created July 13, 2014 06:01
A simple roguelike turn system, very similar to that of Angband.
// A Roguelike turn system
// http://blog.deadreckoned.com/post/91616626322/havenguard-turn-system
// Requires a fast max-heap Priority Queue (I like this one: http://blog.mischel.com/2007/06/22/priority-queue-in-c/)
public class TurnEntity
{
/// <summary>
/// The delegate to execute when the object's turn is executed.
/// </summary>
public Action TurnHandler { get; set; }
@john2x
john2x / 00_destructuring.md
Last active July 9, 2024 01:38
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ikrima
ikrima / build.cs
Created April 6, 2017 20:17
4.15 UE4 Optimized Build Rules
public BBR(TargetInfo Target)
{
//Config
//BuildConfiguration.RelativeEnginePath = /* ...*/;
//Debug
//---BuildConfiguration.bOmitPCDebugInfoInDevelopment = true /* d=false */;
//BuildConfiguration.bSupportEditAndContinue = false /* d=false */;
//BuildConfiguration.bDisableDebugInfoForGeneratedCode = true /* d=true */;
//BuildConfiguration.bAllowLTCG = false /* d=false */;
@redxdev
redxdev / DungeonGenerator.cs
Last active September 11, 2022 06:23
2d Dungeon Layout Generator
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
// NOTE: Some of the classes here (namely the primitives like Vector2d and Rect2d) are not provided,
// but most should be fairly easy to implement yourself or replace with similar
// classes from other libraries.
// The exception is the Delaunay triangulation - that takes quite a bit more effort to implement. That said,
@jcowles
jcowles / MachineLearningResources.md
Last active November 9, 2023 09:56
Machine learning resources

"AI is the new Electricity"

Andrew Ng lecture, Stanford Graduate School of Business
High level, but totally worth watching.
https://www.youtube.com/watch?v=21EiKfQYZXc

Stanford cs231n, winter 2016

I went looking for lectures from different sources and these are a great "from first principles" introduction. The newer cs231n lectures may have more relevant details, but I like Andrej Karpathy's