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.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; |
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
// http_conventions.js | |
var Backbone = require('Backbone'); | |
var postOnUpdate = function(method, model, options) { | |
return Backbone.sync('create', model, options); | |
} | |
var postOnGet = // whatever here | |
export.postOnUpdate = postOnUpdate; | |
export.postOnGet = postOnGet; |
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
class Program | |
{ | |
public HttpResponse BuildDeleteRequest(Action<HttpRequest> action) | |
{ | |
var @object = new HttpRequest() | |
{ | |
Method = "GET" | |
}; | |
action(@object); | |
return @object.Execute(); |
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
// Admin App Host application | |
require('something') // we need to force load all modules, could this be by convention? | |
var Registration = require('register'); | |
var links = Registration.get(); | |
for(var i in links) | |
{ | |
print("<a href='+i.url+' >' + i.title +'</a> | |
} |
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
== equals | |
/= not equals | |
'a' : ['b', 'c'] -- prepend e.g. 1:2:3:[] | |
['a'] ++ ['b', 'c'] --append | |
[x*2 | x <- [1..10], x*2 >= 12] -- list comprehension | |
let rightTriangles = [ (a,b,c) | c <- [1..10], b <- [1..c], a <- [1..b], a^2 + b^2 == c^2] | |
if x > 100 | |
then x |
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
Projects\TestPaket>.paket\paket.exe add nuget automapper project TestPaket | |
Paket version 2.12.8.0 | |
Adding automapper to c:\Users\Alistair\Documents\Visual Studio 2015\Projects\TestPaket\paket.dependencies into group Main | |
Resolving packages for group Main: | |
- automapper 4.0.4 | |
- System.Runtime 4.0.20 | |
- System.Collections 4.0.10 | |
- System.Collections.Concurrent 4.0.10 | |
- System.Diagnostics.Tracing 4.0.20 | |
- System.Diagnostics.Debug 4.0.10 |
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
C:\Users\Alistair\Documents\Visual Studio 2015\Projects\TestPaket>.paket\paket.exe add nuget automapper | |
Paket version 2.16.0.0 | |
Adding automapper to C:\Users\Alistair\Documents\Visual Studio 2015\Projects\TestPaket\paket.dependencies into group Main | |
Resolving packages for group Main: | |
- automapper 4.0.4 | |
- System.Runtime 4.0.20 | |
- System.Collections 4.0.10 | |
- System.Collections.Concurrent 4.0.10 | |
- System.Diagnostics.Tracing 4.0.20 | |
- System.Diagnostics.Debug 4.0.10 |
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
POST /addtoproject HTTP/1.1 | |
Accept-Encoding: identity | |
Content-Length: 1798 | |
Host: localhost:2000 | |
Content-Type: application/json | |
Connection: close | |
User-Agent: Python-urllib/2.7 | |
{"column": "33", "buffer": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Threading.Tasks;\r\nusing Microsoft.AspNet.Builder;\r\nusing Microsoft.AspNet.Hosting;\r\nusing Microsoft.Extensions.Configuration;\r\nusing Microsoft.Ext | |
ensions.DependencyInjection;\r\nusing Microsoft.Extensions.Logging;\r\n\r\nnamespace account\r\n{\r\n public class Startup\r\n {\r\n public Startup(IHostingEnvironment env)\r\n {\r\n // Set up configuration sources.\r\n var build |
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
namespace blackdunes.chronicles | |
{ | |
public class Startup | |
{ | |
private readonly IHostingEnvironment env; | |
public Startup(IHostingEnvironment env) | |
{ | |
// Set up configuration sources. | |
var builder = new ConfigurationBuilder() |
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 abstract class StartupBase | |
{ | |
public virtual void ConfigureService(IServiceCollection services) | |
{ | |
// Standard registrations | |
ConfigureEntityFramework(services); | |
} | |
public abstract void ConfigureEntityFramework(IServiceCollection services); |