Skip to content

Instantly share code, notes, and snippets.

View TimHeckel's full-sized avatar

Tim Heckel TimHeckel

View GitHub Profile
@TimHeckel
TimHeckel / gist:b03f9ecc81ffa96ab303
Last active August 29, 2015 14:01
Recommendations on how to pipe this?
Iron Router route:
this.route("poster", {
where: "server"
, path: "/post"
, action: function() {
var size = 0;
var future = new Future();
@TimHeckel
TimHeckel / gist:7993071
Created December 16, 2013 19:42
unique indexing with Meteor accounts-password and accounts-base exception
W20131216-13:36:08.778(-6)? (STDERR) MongoError: can't use unique indexes with sharding ns:edspringload.users key: { username: 1 }
W20131216-13:36:08.778(-6)? (STDERR) at Object.Future.wait (/Users/heckel/.meteor/tools/ec9f953f89/lib/node_modules/fibers/future.js:326:15)
W20131216-13:36:08.779(-6)? (STDERR) at MongoConnection._ensureIndex (packages/mongo-livedata/mongo_driver.js:616)
W20131216-13:36:08.779(-6)? (STDERR) at Meteor.Collection._ensureIndex (packages/mongo-livedata/collection.js:484)
W20131216-13:36:08.779(-6)? (STDERR) at Accounts.urls (packages/accounts-base/accounts_server.js:688)
W20131216-13:36:08.779(-6)? (STDERR) at packages/accounts-base.js:938:4
W20131216-13:36:08.780(-6)? (STDERR) at packages/accounts-base.js:980:3
W20131216-13:36:08.780(-6)? (STDERR) at /Users/heckel/Documents/TIES/edSpring/.meteor/local/build/programs/server/boot.js:155:10
W20131216-13:36:08.780(-6)? (STDERR) at Array.forEach (native)
W20131216-13:36:08.780(-6)? (STDERR) at Functio
@TimHeckel
TimHeckel / SignalRDyanmicHub.cs
Created April 6, 2012 22:04
Possible implementation of dynamic hubs
//Define contracts something like this:
public interface ISlateApplicationProvider : IHubDescriptorProvider, IMethodDescriptorProvider
{
IList<AppHub> Apps { get; set; }
}
protected class AppHub
{
public string Name { get; set; }
@TimHeckel
TimHeckel / SSOIntegrationWithTender.cs
Created January 20, 2012 00:42
Generating an SSO token for integration with Tenderapp.com using c# / .NET
//Third party dependencies: Newtonsoft JSON Library
public class TenderHelpService
{
public string SiteKey
{
get { return "your_site_key"; }
}
public string ApiKey