Skip to content

Instantly share code, notes, and snippets.

Darren Reid Layoric

Block or report user

Report or block Layoric

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Layoric
Layoric / main.cs
Created Aug 25, 2016
Initializing your Redis connection.
View main.cs
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
public class GithubRepository
{
public string Name { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public string Homepage { get; set; }
@Layoric
Layoric / index.md
Last active Aug 25, 2016
Using ServiceStack.Redis on .NET Core
View index.md
@Layoric
Layoric / main.cs
Created Aug 21, 2016
New Public Gist
View main.cs
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
public class GithubRepository
{
public string Name { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public string Homepage { get; set; }
@Layoric
Layoric / pom.xml
Created Apr 18, 2016
Apache Felix basic POM config
View pom.xml
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the
NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF
licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing
@Layoric
Layoric / HelloWorld.cs
Created Dec 5, 2015
ServiceStack Model routes example
View HelloWorld.cs
[Route("/hello/{Name}")]
public class Hello : IReturn<HelloResponse>
{
public string Name { get; set; }
}
public class HelloResponse
{
public string Result { get; set; }
}
@Layoric
Layoric / AppHost.cs
Last active May 25, 2016
A very simple webhook integration with Slack and ServiceStack response filters
View AppHost.cs
//Example use AppHost
public class AppHost : AppHostBase
{
public AppHost()
: base("SlackPluginExample", typeof(MyServices).Assembly) { }
public override void Configure(Container container)
{
this.Plugins.Add(new SlackNotifierFeature
{
@Layoric
Layoric / getasync.cs
Created Aug 20, 2015
ServiceStack JsonServiceClient GetAsync example snippet
View getasync.cs
client.GetAsync<CustomersResponse>("/customers").Success(response => {
foreach(var c in response.Customers) {
Console.WriteLine(c.CompanyName);
}
}).Error(exception => {
Console.WriteLine(exception.Message);
});
@Layoric
Layoric / basicAuthTest
Created Sep 7, 2014
SS Basic authentication
View basicAuthTest
[TestFixture]
public class UnitTests
{
private readonly ServiceStackHost appHost;
public UnitTests()
{
appHost = new TestAppHost();
appHost.Init().Start("http://*:10100/");
}
View keybase.md

Keybase proof

I hereby claim:

  • I am layoric on github.
  • I am layoric (https://keybase.io/layoric) on keybase.
  • I have a public key whose fingerprint is 135F AF1F 5D3D 50D3 DBA3 FB53 E636 C4A7 22FE 459D

To claim this, I am signing this object:

@Layoric
Layoric / scrollto.js
Created Jun 16, 2014
Simple angular replacement for scroll to content links
View scrollto.js
app.directive('scrollTo', [function () {
"use strict";
return {
restrict: 'EA',
controller: function ($scope) {
},
link: function ($scope,$element,$attrs) {
if($attrs.scrollTo != null) {
var elementNameToScroll = $attrs.scrollTo;
You can’t perform that action at this time.