This file contains 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
export function immutalize(props) { | |
let fields = props.map(name => ({name, symb: Symbol(name)})); | |
const toObj = (inst) => { | |
const obj = {}; | |
fields.forEach(({name, symb}) => obj[name] = inst[symb]); | |
return obj; | |
}; | |
return base => { |
This file contains 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 IFakeOptionsBuilder<TFaked> CallBase<TFaked>(this IFakeOptionsBuilder<TFaked> config) | |
{ | |
return config.Strict() | |
.OnFakeCreated(fake => | |
A.CallTo(fake).Where(c => !c.Method.IsFinal && !c.Method.IsAbstract) | |
.CallsBaseMethod()); | |
} |
This file contains 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
#!/bin/sh | |
if test `uname` = Darwin; then | |
# Running on mac | |
brew update | |
brew install mono | |
else | |
# Running (presumably) on linux | |
# sudo add-apt-repository -y ppa:directhex/monoxide | |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Runt.Bootstrap | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
namespace Test | |
{ |
This file contains 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
using System; | |
using System.IO; | |
using System.Reflection; | |
namespace Kake | |
{ | |
class Bootstrap | |
{ | |
delegate int EntryPoint(string[] args); |
This file contains 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
async function foo() { | |
try { | |
let result = []; | |
for (let value of await getValues()) { | |
let newVal = await asyncOperation(value); | |
console.log(newVal); | |
result.push(newVal); | |
} | |
return result; | |
} catch (e) { |
This file contains 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
app.Use(next => async context => | |
{ | |
await next(context); | |
if(context.Response.ContentLength == null) | |
{ | |
context.Response.StatusCode = 404; | |
var path = Path.Combine(_hostingEnvironment.WebRoot, "_error", "404.html"); | |
var content = File.ReadAllText(path); | |
await context.Response.SendAsync(content, "text/html"); | |
} |
This file contains 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
Get-ChildItem -Filter "*.dll" | ForEach-Object { | |
$a = [reflection.assemblyname]::GetAssemblyName($_.FullName).ProcessorArchitecture | |
Write-Host $a $_.Name | |
} |
This file contains 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
var a$0 = 5; | |
var add$0 = _fun$0('add', 2, function add(_arg0$0, _arg1$0) { | |
var a$1 = _arg0$0, b$0 = _arg1$0; | |
return _op$0('+', a$1, b$0); | |
}); | |
var add1$0 = _call$0(add$0, [1]); | |
var b$1 = _call$0(add1$0, [a$0]); | |
var _ref$0 = function () { | |
var testInner$0 = 15; | |
return _tupleCreate$0([ |
OlderNewer