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.Net.Http; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Amazon.S3; | |
using Amazon.S3.Model; | |
namespace moto_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
{ urlRoot: '/', file: '_build/dev/index.html' } ' -> ' '_build/dev/index.html' | |
{ urlRoot: '/', directory: '_build/dev' } ' -> ' '_build/dev/index.html' | |
events.js:72 | |
throw er; // Unhandled 'error' event | |
^ | |
Error: read ECONNRESET | |
at errnoException (net.js:904:11) | |
at TCP.onread (net.js:558:19) |
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
define("app/router", [], function() { | |
"use strict"; | |
var __moduleName = "app/router"; | |
var Router = Ember.Router.extend({location: 'history'}); | |
Router.map(function() {}); | |
var $__default = Router; | |
return { | |
get default() { | |
return $__default; | |
}, |
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
: foreach app/*.coffee |> ./node_modules/coffee-script/bin/coffee -c -o _build/coffee/ %f |> _build/coffee/%B.js | |
: foreach _build/coffee/*.coffee |> ./node_modules/istanbul/lib/cli.js --output _build/instrumented/ %f |> _build/instrumented/%B.js |
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
// requires at least 1 object parameter and optionally a function callback | |
var foo = sani(['object+|array', 'function?'], function (objs, callback) { | |
if (callback) callback(); | |
return objs.length; | |
}); | |
foo(1, 2); | |
// throws error | |
foo({}, {}); |
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
-module(dstore). | |
% internal operations | |
-export([init/0, loop/1, write/3]). | |
% public system operations | |
-export([start_link/0, stop/0, sync/2, replicate/1, pid/0]). | |
% public k/v operations | |
-export([lookup/1, write/2]). | |
-define(TIMEOUT, 30000). |
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
Directory.EnumerateFiles(_backupdir) | |
.Select(f => new FileInfo(f)) | |
.Where(f => f.CreationTime < DateTime.Now.AddMonths(-1)) | |
.ForEach(f => f.Delete()); |
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
///<summary> | |
/// Helper class to get the word counts from text | |
///</summary> | |
public class WordCount { | |
///<summary> | |
/// Takes in a string of text cuts it up and builds a list of the unique words and | |
/// the number of times they occurred in the list. Optionally takes a regular | |
/// expression to use as the delimiter. By default the delimiter is whitespace. | |
///</summary> |
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
//TData is a type parameter name, sort of like a type variable | |
public class Node<TData> { | |
public Node(TData data){ | |
Value = data; | |
ConnectedNodes = new List<Node>(); | |
} | |
//notice that TData is the type parameter name from above | |
public TData Value { get; private set; } | |
public IList<Node<TData>> ConnectedNodes { get; private set; } |
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 IEnumerable<int> Fibanocci() { | |
var x1 = 1; | |
var x2 = 1; | |
while(true) { | |
var x3 = x1 + x2; | |
x1 = x2; | |
x2 = x3; | |
yield return x3; | |
} |
NewerOlder