Skip to content

Instantly share code, notes, and snippets.

View steff-mueller's full-sized avatar

Steffen Müller steff-mueller

View GitHub Profile
@steff-mueller
steff-mueller / apex.json
Last active April 3, 2016 08:41
Apex scoop package
{
"homepage": "http://apex.run/",
"license": "MIT",
"version": "0.7.3",
"architecture": {
"32bit": {
"url": "https://github.com/apex/apex/releases/download/v0.7.3/apex_windows_386.exe"
},
"64bit": {
"url": "https://github.com/apex/apex/releases/download/v0.7.3/apex_windows_amd64.exe"
@steff-mueller
steff-mueller / .vimrc
Last active December 20, 2015 07:49
My current .vimrc
set shell=/bin/bash
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@steff-mueller
steff-mueller / gist:5124242
Last active December 14, 2015 17:48
DSL for REST service testing
describe 'User Administration', () ->
it 'Get user', req ->
req.get '/users'
.expectStatus 200
.expectJSONTypes
id: Number,
username: String,
is_admin: Boolean
.expectJSON
@steff-mueller
steff-mueller / gist:3750826
Created September 19, 2012 17:07
ReactiveUI validation
public interface IValitated
{
Dictionary<string, Func<string>> Validators { get; set; }
}
public class ValidatedReactiveObject : ReactiveObject, IValitated, IDataErrorInfo
{
public Dictionary<string, Func<string>> Validators { get; set; }
public ValidatedReactiveObject()
@steff-mueller
steff-mueller / RestServiceExtensions.cs
Created August 26, 2012 21:59 — forked from vansha/RestServiceExtensions.cs
ServiceStack RestService extension allowing to call REST services in a generic way.
namespace ServiceStack.Service
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using ServiceStack.Service;
using ServiceStack.ServiceClient.Web;
using ServiceStack.ServiceHost;
@steff-mueller
steff-mueller / gist:3177873
Created July 25, 2012 18:54
ServiceStack v4.00

Multiple reqeust DTOs per service

Default routes are normal REST routes now.

Default routes have changed to:

/[json/xml/jsv/csv/form]/[requestreply/oneway]/[operation name]

Async

The REST routes (AsyncRestHandler) and the SOAP handler (AsyncSoapHandler) are using IHttpAsyncHandler to process requests.

@steff-mueller
steff-mueller / gist:2911124
Created June 11, 2012 16:35
ServiceStack | Async refactor?
public IAsyncService<TReq>
{
	Task<object> ExecuteAsync<TReq>(TReq req);
}
public class ServiceBase<TReq> : IAsyncService<TReq>
{
@steff-mueller
steff-mueller / draft-notes.md
Created May 20, 2012 08:26 — forked from mythz/draft-notes.md
draft-notes.md

v3.78 Release Notes

Although it's been a long time between formal releases - v3.78 marks our been our biggest release ever! Mostly of a result of being too busy to prepare the release notes for all the effort that have gone into the framework (and supporting libraries) in the last 6 months :)

Today we hope to rectify this neglect with a special thanks to all the contributors that helped make this release possible. We would like to pay a special thanks to Steffen Müller @arxisos whose code and documentation contributions and support in the forums and real-time help over these last 6 months have been invaluable.

A lot of features being announced are already well known to our active user-base as they've shipped in our production release builds for months. Hopefully these notes will highlight other useful but less known features.

Awesome Feedback

@steff-mueller
steff-mueller / Async_with_sleep.cs
Created May 16, 2012 16:52 — forked from ahall/gist:2710678
Async vs Sync for servicestack
// Async with 200 ms timeout
ahall@jetsam:~$ ab -c 5 -n 2000 "http://127.0.0.1:53211/async?format=json"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 200 requests
Completed 400 requests
Completed 600 requests
public class TweetsService : RestServiceBase<Tweets>
{
public ICacheClient Cache { get; set; }
public object OnGet(Tweets request)
{
var tweets = this.Cache.Get<List<Tweets>>("yourkey");
if(tweets == null)
{
tweets = LoadTweetsFromExternalService();