Skip to content

Instantly share code, notes, and snippets.

View HeilTec's full-sized avatar

Jesper Heilmann HeilTec

View GitHub Profile
@HeilTec
HeilTec / osInfo.js
Created December 13, 2016 20:26
Node program to print all available info from the 'os' module using functional style.
// Node program to print all available info from the 'os' module using functional style.
const os = require('os');
const allInfo = Object.keys(os);
const isOsFunction = (item) => typeof os[item] === "function";
const isNotOsFunction = (item) => typeof os[item] !== "function";
const callFunction = (info) => ({[info+'()']: os[info]()});
@HeilTec
HeilTec / README.md
Created December 22, 2016 16:37
Demonstration of why not to use the with statement.
@HeilTec
HeilTec / html_electron.js
Last active November 13, 2017 12:10
Electron-mocha html_electron reporter
'use strict';
/* eslint-env browser */
/**
* Module dependencies.
*/
var Base = require('./base');
var utils = require('./utils');
@HeilTec
HeilTec / partytime.js
Created May 17, 2018 02:23
The Best Time to Party
// (Impure) Functional javascript kata inspired by
// Puzzle 2: The Best Time to Party
// MIT 6.S095 Programming for the Puzzled, IAP 2018
// https://youtu.be/a1RaIqkdG0c
// Assuming that the list of celebrities can be very large
// and the number of hours are limited (small)
// This solution only traverses the list once
// Celebrities arrival and departure times
@HeilTec
HeilTec / Program.cs
Created January 9, 2023 16:45
Analyzing Space Engineers Conveyor System Connective Properties
using Sandbox.Game.EntityComponents;
using Sandbox.ModAPI.Ingame;
using Sandbox.ModAPI.Interfaces;
using SpaceEngineers.Game.ModAPI.Ingame;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;