Skip to content

Instantly share code, notes, and snippets.

View chrisumbel's full-sized avatar

Chris Umbel chrisumbel

View GitHub Profile
@chrisumbel
chrisumbel / vcap_parser.cs
Created March 17, 2016 10:07
DOTNET VCAP Services Parser
// using Newtonsoft.Json.Linq;
private String VCAPServices() {
if (Environment.GetEnvironmentVariable("VCAP_SERVICES") == null)
{
return @" {
""user-provided"": [
{
""credentials"": {
""uri"": ""http://localhost:13471""
@chrisumbel
chrisumbel / simpleservicecall.cs
Last active March 17, 2016 09:31
DOTNET SimpleService call
/*
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
*/
private string ServivceURL() {
return "http://umbel-beverage-service.cfapps.pez.pivotal.io";
}
@chrisumbel
chrisumbel / dotNetPassHash
Created September 4, 2011 16:13 — forked from PalmerEk/dotNetPassHash
ASP.NET Membership password hash for Node.js
var crypto = require('crypto');
console.log(dotnet_membership_password_hash("welcome1", "qkI2wRPSW7Y4ArqWkfHm5g==")); // W25/z6MAywBax7DITuKgSmsXua4=
function dotnet_membership_password_hash(pass, salt)
{
var bytes = new Buffer(pass || '', 'ucs2');
var src = new Buffer(salt || '', 'base64');
var dst = new Buffer(src.length + bytes.length);
src.copy(dst, 0, 0, src.length);
@chrisumbel
chrisumbel / oss.txt
Created September 2, 2011 03:12
Open Source Notes
Contributing to Open Source
===========================
First Rule: You can find the time
- It doesn't take much
- Weekends are good
- Find what other time you're wasting
- Try something that's _not_ your day job
Second Rule: What to contribute to?