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
{ | |
"webroot": "wwwroot", | |
"exclude": [ | |
"wwwroot", | |
"bower_components", | |
"node_modules", | |
"grunt" | |
], | |
"publishExclude": [ | |
"bower.json", |
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
'use strict'; | |
import React from 'react'; | |
export default class Html extends React.Component { | |
render() { | |
return ( | |
<html> | |
<head> | |
<title>{this.props.title}</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css" /> |
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
"scripts": { | |
"build-client": "webpack --verbose --colors --display-error-details --config webpack.client.js", | |
"watch-client": "webpack --verbose --colors --display-error-details --config webpack.client-watch.js && webpack-dev-server --config webpack.client-watch.js" | |
} |
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
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var source = require("vinyl-source-stream"); | |
var babelify = require("babelify"); | |
var watchify = require('watchify'); | |
var gutil = require('gulp-util'); | |
var browserSync = require('browser-sync'); | |
var historyApiFallback = require('connect-history-api-fallback') | |
var notify = require("gulp-notify"); |
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
#!bin/bash | |
#Update the system first | |
sudo apt-get -y update && sudo apt-get -y dist-upgrade | |
# | |
# Remove stuff | |
# | |
#Clean-up System |
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 DbSet<T> AsFakeDbSet<T>(this IEnumerable<T> data) where T : class | |
{ | |
var queryAble = data.AsQueryable(); | |
var fakeDbSet = A.Fake<DbSet<T>>(builder => | |
builder.Implements(typeof (IQueryable<T>))); | |
A.CallTo(() => ((IQueryable<T>) fakeDbSet).Provider).Returns(queryAble.Provider); | |
A.CallTo(() => ((IQueryable<T>) fakeDbSet).Expression).Returns(queryAble.Expression); | |
A.CallTo(() => ((IQueryable<T>) fakeDbSet).ElementType).Returns(queryAble.ElementType); |
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
async Task<int> ProcessObjectsAsync(List<SomeObjects> objectList, IProgress<int> progress,CancellationToken ct) | |
{ | |
int processCount = await Task.Run<int>(() => | |
{ | |
foreach (var someObject in objectList) | |
{ | |
ct.ThrowIfCancellationRequested(); | |
// process next thing | |
} | |
}, ct); |
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
Erlang R15B (erts-5.9) | |
> Five = 5. | |
5 | |
> 5 = Five. | |
5 | |
> Five = 1. | |
"exception error: no match of right hand side value 1" | |
> |
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(stringcalc). | |
-export([add/1, test/0]). | |
%% Test methods. | |
%% Returns ok if all is well. | |
test() -> | |
3 = add("1,2"), | |
0 = add(""), | |
1 = add("1"), | |
6 = add("1\n2,3"), |