Skip to content

Instantly share code, notes, and snippets.

Avatar

Hendrik Mans hmans

View GitHub Profile
@hmans
hmans / .editorconfig
Created Aug 13, 2020
Unity ♥️ Git
View .editorconfig
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
@hmans
hmans / BobTheBuilder.cs
Last active Oct 7, 2020
A basic pipeline for performing headless Unity builds for multiple platforms at once.
View BobTheBuilder.cs
/* This needs to live in a folder named "Editor", or it won't work. Doesn't have to be named
"BobTheBuilder", though. Name it whatever you want! */
using System;
using UnityEditor;
using UnityEngine;
public class BobTheBuilder
{
/* List of scenes to include in the build */
@hmans
hmans / application.html.slim
Created Mar 27, 2020
Rails 6.0 Slim Application Layout
View application.html.slim
doctype html
html
head
title My App
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
= csrf_meta_tags
= csp_meta_tag
@hmans
hmans / application.html.slim
Created Apr 30, 2019
Rails 6.0 Application Layout using Slim
View application.html.slim
doctype html
html
head
title My Rails 6.0 App
= csrf_meta_tags
= csp_meta_tag
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
@hmans
hmans / gamedevcheatsheet.md
Last active Jun 29, 2018
Game Development Cheat Sheet
View gamedevcheatsheet.md
@hmans
hmans / app.cr
Created Apr 25, 2018
Happy + Crystal = Crappy
View app.cr
require "crappy"
class AppHandler
include HTTP::Handler
include Crappy::Routing
include Crappy::Rendering
def call(context)
crappy do
within "api" do
@hmans
hmans / application.html.slim
Last active Oct 23, 2018
Rails 5.2 Application Layout using Slim
View application.html.slim
doctype html
html
head
title My Rails 5.2 App
= csrf_meta_tags
= csp_meta_tag
meta name="viewport" content="width=device-width, initial-scale=1.0"
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
@hmans
hmans / application.html.slim
Created Dec 3, 2017
Rails 5.2 Slim Application Layout
View application.html.slim
doctype html
html
head
title My Rails 5.2 App
meta name="viewport" content="width=device-width, initial-scale=1.0"
= csrf_meta_tags
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
body
@hmans
hmans / main.coffee
Last active Apr 19, 2017
Inferno.js memoization decorator function using NO_OP
View main.coffee
memoize = require './memoize'
# By using memoize, the following functional component will only update
# when the props passed into it have changed. Please note that this assumes
# that the actual prop values are immutable objects, since we don't perform
# any deep equality checks.
logPanel = memoize ({log}) ->
h '#log-panel', [
for line in log
@hmans
hmans / about.md
Created Apr 19, 2017
Elm-flavoured Incremental Game Framework?
View about.md

Here's a tiny, but fully functional (ha) incremental game framework. Some notes:

  • Built with CoffeeScript. I like CoffeeScript very much.
  • Inspired by Elm, minus the types, obviously.
  • Uses Inferno.js as its rendering layer. It's extremely fast.
  • main.coffee dispatches to a state object, because games typically employ finite state machines. With a single state, this is unneccessary, of course.

-- Hendrik Mans, hendrik@mans.de

You can’t perform that action at this time.