Skip to content

Instantly share code, notes, and snippets.

View nbarbettini's full-sized avatar

Nate Barbettini nbarbettini

View GitHub Profile
@nbarbettini
nbarbettini / shoutcloud-example.cs
Last active April 10, 2016 23:59
Shoutcloud.NET example
using SHOUTCLOUD;
var HELLO = await SHOUTCLOUD.UPCASE("hello world");
@nbarbettini
nbarbettini / Program.cs
Created March 24, 2016 17:58
StormpathImportAccounts
namespace StormpathImportAccounts
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Stormpath.SDK;
using Stormpath.SDK.Account;
using Stormpath.SDK.Client;
@nbarbettini
nbarbettini / blocking-exception.cs
Last active March 11, 2016 18:13
Blog post: Async/Await in a CLI application
class Program
{
static void Main(string[] args)
{
try
{
var result = SomeAsyncCode().Result;
Console.WriteLine(result);
}
catch (ArgumentException aex)
@nbarbettini
nbarbettini / CredentialsModule.cs
Created February 9, 2016 19:00
Stormpath Nancy module example
using System;
using System.Linq;
using Nancy;
using Nancy.ModelBinding;
using Stormpath.SDK.Account;
using Stormpath.SDK.Api;
using Stormpath.SDK.Application;
using Stormpath.SDK.Client;
using Stormpath.SDK.Sync;
@nbarbettini
nbarbettini / keybase.md
Created February 5, 2016 17:44
Keybase proof

Keybase proof

I hereby claim:

  • I am nbarbettini on github.
  • I am nbarbettini (https://keybase.io/nbarbettini) on keybase.
  • I have a public key ASB65ej-Js6sQqxeKsnk9lqycKW-wNXmesd81G_irmaUyAo

To claim this, I am signing this object:

@nbarbettini
nbarbettini / Program.cs
Created January 4, 2016 15:00
Validate an access token with Stormpath and RestSharp
using System;
using System.Text;
using System.Threading.Tasks;
using RestSharp;
namespace AccessTokenVerifier
{
class Program
{
private static readonly string apiBaseUrl = "https://api.stormpath.com/v1/";
@nbarbettini
nbarbettini / MarketData.cs
Created November 12, 2015 17:54
Make a request to Blockchain.info API with RestSharp
using RestSharp.Deserializers;
namespace BlockchainExchangeRates
{
public class MarketData
{
[DeserializeAs(Name = "15m")]
public double Delayed15Min { get; set; }
public double Last { get; set; }
@nbarbettini
nbarbettini / HttpWebRequestDemo.cs
Last active July 6, 2016 00:02
C# demo with HttpWebRequest connecting to Stormpath API
// NOTE: This code is deprecated in favor of the Stormpath .NET SDK
// see https://docs.stormpath.com/csharp/product-guide/latest/quickstart.html
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;
@nbarbettini
nbarbettini / quickstart.md
Created September 18, 2015 21:33
Quickstart for Stormpath.SDK v0.1.0-rc

Installation instructions

The Stormpath C# SDK consists of three packages: Stormpath.SDK.Core, Stormpath.SDK.JsonNetSerializer, and Stormpath.SDK.RestSharpClient. The latter two contain dependencies on external libraries (JSON.NET and RestSharp). These are required for the SDK to run properly.

For convenience, the meta-package Stormpath.SDK contains everything you need to get up an running quickly. 👍

Using the Nuget Package Manager

  1. Right-click on the new project in the Solution Explorer and choose Manage Nuget Packages...
  2. Search for Stormpath. Install the Stormpath.SDK package.