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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core, Version=1.0.0, Culture=neutral"/> | |
</configSections> | |
<glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd"> | |
<logging level="Trace"/> | |
<runtimePolicies> | |
<ignoredTypes> | |
<add type="Glimpse.Core.Policy.ControlCookiePolicy, Glimpse.Core"/> |
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 Foo { | |
func bar() -> String { | |
return "Hello" | |
} | |
} | |
func greet (f: Foo) -> String { | |
return f.bar() | |
} |
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 class MyBootstrapper : DefaultNancyBootstrapper | |
{ | |
protected override void ApplicationStartup(TinyIoc.TinyIoCContainer container, Bootstrapper.IPipelines pipelines) | |
{ | |
base.ApplicationStartup(container, pipelines); | |
Nancy.Security.Csrf.Enable(pipelines); | |
} | |
} |
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 TracingMiddleware | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using MidFunc = System.Func< | |
System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task> |
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
function wrapEqualityComparerWithDateSupport(origFn) { | |
return function (a, b) { | |
return origFn(a, b) || | |
(a instanceof Date && b instanceof Date && a.getTime() === b.getTime()); | |
} | |
} | |
ko.observable.fn.equalityComparer = wrapEqualityComparerWithDateSupport(ko.observable.fn.equalityComparer); | |
ko.dependentObservable.fn.equalityComparer = wrapEqualityComparerWithDateSupport(ko.dependentObservable.fn.equalityComparer); |
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
grunt.registerTask('config', function (env) { | |
var config = grunt.file.readJSON('src/config.json'); | |
var envs = { | |
production: { | |
apiUrl: 'http://foo.com' | |
}, | |
staging: { | |
apiUrl: 'http://bar.com' | |
} | |
}; |
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
import io.undertow.Undertow; | |
import io.undertow.util.Headers; | |
public class HelloServer { | |
public static void main(final String[] args) { | |
Undertow server = Undertow.builder() | |
.addHttpListener(8081, "localhost") | |
.setHandler((exchange) -> { | |
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "text/plain"); | |
exchange.getResponseSender().send("Hello World"); |
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
$ git branch -r --merged origin/development | | |
grep origin | | |
grep -v '>' | | |
grep -v 'master$' | | |
grep -v 'development$' | | |
xargs -L1 | | |
cut -d"/" -f2- | | |
xargs git push origin --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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Macto | |
{ | |
public class Inmate | |
{ | |
public int Id { get; 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
{ | |
"Results": [ | |
{ | |
"Title": "Macto: The boundaries of a prison", | |
"LegacySlug": null, | |
"Body": "<p>Macto is a prison management system. To be rather more exact, it is an <em>incarceration </em>management system. Managing a prison is a very complex process (did you ever think about who takes the trash out? Or how to handle things like watch rotations?).</p> <p>I am getting ahead of myself, however. The first thing that we have to do when we start designing a system is check:</p> <ul> <li>What is the scope of the system?</li> <li>What is the intended usage?</li> <li>Who are the users?</li> <li>What other systems are we going to interface with?</li></ul> <p>Those are the basics, because in a lot of projects, they don’t get asked.</p> <p>Running a prison is a complex task, I already said. If we wanted a single piece of software to do it all, we would have to do a <em>lot</em> of stuff that we don’t really need. For example, are we going to write our own payroll system for the prison’s stuff? O |
OlderNewer