Skip to content

Instantly share code, notes, and snippets.

View NikolajDL's full-sized avatar

Nikolaj Dam Larsen NikolajDL

  • RINA Digital Solutions
  • Aalborg
View GitHub Profile
@NikolajDL
NikolajDL / factorio_calculater.js
Created October 29, 2017 13:27
Factorio Calculater
var config = {
blue_circuit: createItem(10, 1, { red_circuit: 2, green_circuit: 20 }),
red_circuit: createItem(6, 1, { green_circuit: 2, plastic: 2, copper_cable: 4 }),
green_circuit: createItem(0.5, 1, { copper_cable: 3 }),
plastic: createItem(1, 2, { }),
copper_cable: createItem(0.5, 2, { }),
rail: createItem(0.5, 2, { iron_stick: 1, steel: 1 }),
iron_stick: createItem(0.5, 2, { }),
steel: createItem(17.5 * (1.25 / 2), 1, { }),
gear: createItem(0.5, 1, { }),
@NikolajDL
NikolajDL / Tiling.cs
Last active August 29, 2015 14:11
Unity3D X-coordination sprite tiling script
using System;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(SpriteRenderer))]
public class Tiling : MonoBehaviour
{
public int OffsetX = 2;
/**************************************************************************
*
* Original code from:
* https://gist.github.com/wmiller
*
* Updated by:
* https://gist.github.com/stfx
*
* Extended by:
* Me (https://gist.github.com/Excolo)
@NikolajDL
NikolajDL / MyWebViewPage.cs
Created February 6, 2014 14:46
A dynamic object to wrap WebConfigurationManager.AppSettings to access the settings "prettily". Great in combination with a custom ASP.NET MVC WebViewPage for easy access in views.
public abstract class MyWebViewPage<TModel> : WebViewPage<TModel>
{
public dynamic Settings
{
get { return SettingsHelper.Instance; }
}
}
public abstract class MyWebViewPage : WebViewPage
{