Skip to content

Instantly share code, notes, and snippets.

View serialseb's full-sized avatar

Sebastien Lambla serialseb

View GitHub Profile
@serialseb
serialseb / stuff.json
Created September 13, 2019 13:34
stuff to do in prognet with context
{
"@context":{
"dothework": "here"
},
"id": 1,
"node_id": "MDU6SXNzdWUx",
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
"number": 1347,
"state": "open",
"title": "Found a bug",

Keybase proof

I hereby claim:

  • I am serialseb on github.
  • I am serialseb (https://keybase.io/serialseb) on keybase.
  • I have a public key whose fingerprint is 6D5D EE59 E8E6 43EA ECFD FB23 C2E7 4447 91B7 A209

To claim this, I am signing this object:

@serialseb
serialseb / !vest-specifications
Last active January 25, 2016 13:45
vest-specifications
examples of VEST specifications
@serialseb
serialseb / 2016-01-20-my-post.md
Last active January 20, 2016 18:10
master-templates
title layout
My post
post

Some content here

@serialseb
serialseb / test
Last active December 25, 2015 20:59
Tests for calculator
1+1,2
1.1+0.1,1.2
1+-1,0
-2+1,-1
1+2+3,6
2*3,6
2*-3,-6
2*3*4,24
3+3*4,15
(3+3)*4,24
@serialseb
serialseb / gist:1373311
Created November 17, 2011 14:52
rest-aurant client
class Program
{
private const string REL_RESTAURANT_LIST = "http://rest.aurant.org/restaurant-list";
static void Main(string[] args)
{
var restaurantHref = DiscoverRestaurantListUri();
Console.WriteLine("Using " + restaurantHref);
var selectedRestaurant = SelectRestaurantUri(restaurantHref);
public static IEnumerable<Dictionary<string, string>> ItemScope(this XDocument document, string schema, params string[] propertyNames)
{
return from node in document.Document.Descendants()
where node.HAttr("itemtype") == schema
where node.HAttr("itemscope") == "itemscope"
select (from property in node.Descendants()
let propName = property.HAttr("itemprop")
where propertyNames.Contains(propName)
select property).ToDictionary(_=>_.HAttr("itemprop"), _=>_.Value);
}
@serialseb
serialseb / gist:1373164
Created November 17, 2011 13:45
Parsing link headers quick and dirty
static internal class ResponseExtensions
{
public static string GetLinkValue(this WebResponse response, string rel)
{
return (from header in response.Headers["Link"].Split(',')
let components = header.Split(';')
let uri = components[0]
where components.Any(
component =>
Regex.IsMatch(component,
@serialseb
serialseb / gist:1238163
Created September 23, 2011 18:59
Which language do you prefer?
ResourceSpace.Has.Resource<Home>()
/*(1)*/ .Map(_=>_.LastModified(r=>r.UpdateTime)
.Etag(r=>r.ID))
/*(2)*/ .MapLastModified(_=>_.UpdateTime)
.MapEtag(r=>r.ID)
/*(3)*/ .Map().LastModified(_=>_.UpdateTime)
.Etag(_=>_.ID)
@serialseb
serialseb / ddd-excercise1
Created December 8, 2010 14:56
A simple value object in .net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace DDD_1
{
class Program
{