Skip to content

Instantly share code, notes, and snippets.

Jimit Ndiaye jimitndiaye

Block or report user

Report or block jimitndiaye

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
@btroncone
btroncone / ngrxintro.md
Last active Apr 6, 2020
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series
View ngrxintro.md

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active Apr 5, 2020
Event-stream based GraphQL subscriptions for real-time updates
View Event-stream based GraphQL subscriptions.md

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@jbtule
jbtule / AESGCM.cs
Last active Mar 22, 2020
I have two code examples that I wrote for best practices encrypting a string in c#. They are both using authenticated encryption. http://stackoverflow.com/a/10366194/637783
View AESGCM.cs
/*
* This work (Modern Encryption of a String C#, by James Tuley),
* identified by James Tuley, is free of known copyright restrictions.
* https://gist.github.com/4336842
* http://creativecommons.org/publicdomain/mark/1.0/
*/
using System;
using System.IO;
using System.Text;
@mythz
mythz / ServiceStack_FilesService.cs
Created Dec 27, 2011
ServiceStack RestFiles vs WCF Web APIs port
View ServiceStack_FilesService.cs
/*
Contains the file manager implementation of ServiceStack's REST /files Web Service:
Demo: http://www.servicestack.net/RestFiles/
GitHub: https://github.com/ServiceStack/ServiceStack.Examples/
*/
using System;
using System.IO;
using System.Net;
using RestFiles.ServiceInterface.Support;
@jimitndiaye
jimitndiaye / ConcurrentLinkedList.cs
Last active Oct 25, 2017
ConcurrentLinkedList<T>
View ConcurrentLinkedList.cs
#pragma warning disable 420
namespace System.Collections.Concurrent
{
using Azure.Framework;
using Diagnostics;
using Diagnostics.Contracts;
using Generic;
using Runtime.InteropServices;
using Runtime.Serialization;
@rubysolo
rubysolo / etc_init.d_unicorn_example.co.uk
Created Oct 27, 2011 — forked from scottlowe/etc_init.d_unicorn_example.co.uk
Ruby on Rails server setup on Ubuntu 11.04 with Nginx, Unicorn, Rbenv
View etc_init.d_unicorn_example.co.uk
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
@yevhen
yevhen / SpecificationFixture.cs
Created Jul 27, 2011
NUnit support for Greg Young's Simple.Testing "framework"
View SpecificationFixture.cs
[TestFixture]
public class SpecificationFixture
{
[Test, TestCaseSource("GetSpecificationTestCases")]
public void Verify(SpecificationToRun spec)
{
var runner = new SpecificationRunner();
RunResult result = runner.RunSpecifciation(spec);
if (result.Passed)
View DomainSpecificationExtension.cs
public static class DomainSpecificationExtensions
{
public static void ShouldHave<T>(this IEnumerable<ISourcedEvent> source, params Predicate<T>[] conditions) where T : class, ISourcedEvent
{
T actualEvent = (T) source.FirstOrDefault(x => x is T);
if (actualEvent == null)
throw new SpecificationException(string.Format("{0} did not happen as expected", typeof (T).Name));
actualEvent.ShouldMatch(conditions);
}
You can’t perform that action at this time.