Skip to content

Instantly share code, notes, and snippets.

View lars-erik's full-sized avatar

Lars-Erik Aabech lars-erik

View GitHub Profile
@rikukissa
rikukissa / POST.md
Last active January 27, 2020 08:10
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom #angular.js #testing
title slug createdAt language preview
Unit testing Angular.js app with node.js, mocha, angular-mocks and jsdom
unit-testing-angular-js-app-with-node
2015-07-05T18:04:33Z
en
Majority of search result about unit testing Angular.js apps is about how to do it by using test frameworks that run the tests in a real browser. Even though it's great to be able to test your code in multiple platforms, in my opinion it creates a lot of boilerplate code and makes it hard to run the tests in, for instance a CI-server.

Testing Angular.js app headlessly with node.js + mocha

Lean unit tests with minimal setup

@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
@aaronpowell
aaronpowell / gist:6695293
Created September 25, 2013 04:55
Copy Umbraco files on build
<Target Name="BeforeBuild">
<ItemGroup>
<UmbracoFiles Include="..\packages\UmbracoCms.6.1.5\UmbracoFiles\umbraco\**\*;" />
<UmbracoClientFiles Include="..\packages\UmbracoCms.6.1.5\UmbracoFiles\umbraco_client\**\*;" />
</ItemGroup>
<Copy SourceFiles="@(UmbracoFiles)" DestinationFiles="@(UmbracoFiles->'umbraco\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(UmbracoClientFiles)" DestinationFiles="@(UmbracoClientFiles->'umbraco_client\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
@sitereactor
sitereactor / Subpage.cs
Last active December 22, 2015 14:39
Proof of concept for a simple TypedModelBase class with some sample model implementations. The idea is to use the TypedModelBase class for strongly typed models, which also enables strongly typed queries in your Umbraco MVC views. The code for these strongly typed models can be generated by Umbraco or created by the user (possibly in a code firs…
using System.Collections.Generic;
using Umbraco.Core.Models;
namespace Umbraco
{
/// <summary>
/// Represents a Subpage which acts as the strongly typed model for a Doc Type
/// with alias "Subpage" and "Subpage" as the allowed child type.
///
/// Similar to the Textpage this model could also be generated, but it could also
@milas
milas / .gitconfig
Last active November 8, 2017 11:30
Settings for using Visual Studio 2012 as a diff and merge (3-way) tool for git
[diff]
tool = vsdiffmerge
[difftool]
prompt = true
[difftool "vsdiffmerge"]
cmd = \""C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\vsdiffmerge.exe"\" \""$LOCAL"\" \""$REMOTE"\" //t
keepbackup = false
trustexistcode = true
[merge]
tool = vsdiffmerge