Skip to content

Instantly share code, notes, and snippets.

Simone Busoli simoneb

Block or report user

Report or block simoneb

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
simoneb /
Last active Aug 29, 2015 dashing widget


Dashing widget to show details about your Italian Wind mobile contracts. It supports both prepaid SIM cards and contracts and can display:

  • credit
  • voice traffic
  • text traffic
  • data traffic
  • expiries
View gist:7b4a1b552f956cc8d4ce
DQuid IO - OAuth2 - Implementation
This document contains a guide to implement an OAuth2 client for DQuid IO's services.
## A brief overview of OAuth2
### Access Tokens
APIs protected via OAuth2 require what is known as an **access token** to be accessed. An access token allows to implement a form of HTTP authentication which requires the token to be sent **alongside every request**, most commonly in the **authorization** header of the HTTP request:
View 1 - Test.cs
public class Test : Calculator
public void No_books_are_0()
Assert.AreEqual(0, Price());
View Foldr.cs
public static class Extensions
public static bool And(this IEnumerable<bool> bools)
return bools.Foldr(Expression.AndAlso, true);
public static T Foldr<T>(this IEnumerable<T> enumerable, Func<Expression, Expression, BinaryExpression> fold, T v)
foreach(var b in enumerable)
View costura.xml
AssemblyFile="$(SolutionDir)[path to]\Costura.dll" />
<Target Name="AfterBuild">
<Costura.EmbedTask />
View gist:1562857
IEnumerable<string> Anagrams(IEnumerable<char> input)
foreach (var c in input)
var except = input.Except(new[]{c});
foreach (var element in Anagrams(except))
yield return c.ToString() + element;
simoneb / gist:2508758
Created Apr 27, 2012
Async IO the simple way
View gist:2508758
using(var c = new WebClient())
c.DownloadStringCompleted += (_, r) => Console.WriteLine(r.Result);
c.DownloadStringAsync(new Uri(""));
View nunit-simple-test.cs
public void OneSimpleTest()
var eightBall = new EightBall();
var answer = eightBall.ShouldIChangeJob();
Assert.That(answer, Is.True);
simoneb / nunit-simple-test-workaround.cs
Last active Dec 11, 2015
A simple test - workaround for async
View nunit-simple-test-workaround.cs
public void OneSimpleTest()
var eightBall = new EightBall();
Task<bool> answer = eightBall.ShouldIChangeJob();
Assert.That(answer.Result, Is.True);
You can’t perform that action at this time.