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:9114868cf2bbe22eb194
Created August 12, 2014 15:43
oplog tailing query example
"query" : {
"ns" : {
"$regex" : "^edspringload\\."
},
"$or" : [
{
"op" : {
"$in" : [
"i",
"u",
##Setting up kubernetes on AWS
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/getting-started-guides/aws.md
https://github.com/pires/kubernetes-elasticsearch-cluster
aws iam create-instance-profile --instance-profile-name kubernetes
create a role in AWS called kubernetes-role and add ec2-full-access
@TimHeckel
TimHeckel / 0_reuse_code.js
Created September 23, 2015 01:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@TimHeckel
TimHeckel / anonymization_transformation.json
Last active September 23, 2015 02:05
CedarExpert: anonymization transformation step
{
"type": "anonymize",
"root": "xSre",
"order": 2,
"mapping": [
{ "prop": "refId", "replace": "random" }
, { "prop": "localId", "replace": "hash" }
, { "prop": "loginId", "replace": "delete" }
, { "prop": "stateProvinceId", "replace": "hash" }
, { "prop": "givenName", "replace": "given_name_string (optional, defaults to the prop)" }
@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
@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; }
{
type: "anonymize",
root: "xSre",
order: 2,
mapping: [
{
prop: "refId",
replace: "random"
},
{
@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

#Setting up Serverless + Phenomic + S3 client

###Prerequisites:

  1. Sign up or log in to the AWS console and ensure you have a IAM user called serverless-admin with admin rights. (Obviously not a prod setting). A walkthrough is here.
  2. Create a [profile-name] in your ~/.aws/credentials file with your newly created admin user:
[serverless-admin]
aws_access_key_id=XXX