# If inside vmware install vmware tools (these are just as good as the commercial ones)
sudo apt-get install open-vm-tools open-vm-tools-desktop
# Install git
sudo apt-get install git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const poll = async ({ fn, validate, interval, maxAttempts }) => { | |
let attempts = 0; | |
const executePoll = async (resolve, reject) => { | |
const result = await fn(); | |
attempts++; | |
if (validate(result)) { | |
return resolve(result); | |
} else if (maxAttempts && attempts === maxAttempts) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" %> | |
<%@ Import Namespace="EPiServer.Find.Framework" %> | |
<%@ Import Namespace="EPiServer.Find.Helpers" %> | |
<%@ Import Namespace="Newtonsoft.Json.Serialization" %> | |
<%@ Import Namespace="EPiServer" %> | |
<%@ Import Namespace="EPiServer.ServiceLocation" %> | |
<%@ Import Namespace="EPiServer.Core" %> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module WebApi2Helpers | |
// Port of answer by @nikosbaxevanis :- http://stackoverflow.com/a/19954215/11635 | |
open System | |
open Ploeh.AutoFixture | |
open Ploeh.AutoFixture.Kernel | |
open Ploeh.AutoFixture.Xunit | |
open Ploeh.AutoFixture.AutoFoq | |
open System.Web.Http.Hosting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body { | |
cursor: default; | |
} | |
code { | |
cursor: text; | |
} | |
/* |
Put test1.js
and test2.js
into a tests/
directory, then run the suite:
$ casperjs test tests/ --pre=pre.js --includes=inc.js --post=post.js
Test file: /Users/nperriault/tmp/pre-inc/pre.js
Hey, I'm executed before the suite.
Test file: /Users/nperriault/tmp/pre-inc/tests/test1.js
# this is test 1
Hi, I've been included.
PASS Subject is strictly true
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class StructureMapDecoratorHelperExtension | |
{ | |
public static DecoratorHelper<TTarget> Decorate<TTarget>(this SmartInstance<TTarget> instance) | |
{ | |
return new DecoratorHelper<TTarget>(instance); | |
} | |
} | |
public class DecoratorHelper<TTarget> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Interreg.App.Audit.Application{ | |
using Domain.Model.Applications; | |
public class ApplicationAudit:Audit{ | |
public override void AttachHandlers(){ | |
On<AttachmentAdded>(e=>e.Source.LogEvent( | |
"Attachment named '{0}' added".With(e.Attachment.Name))); | |
On<AttachmentRemoved>(e=>e.Source.LogEvent( | |
"Attachment named '{0}' removed".With(e.Attachment.Name))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |