Skip to content

Instantly share code, notes, and snippets.

@dweinstein
dweinstein / Dockerfile
Created March 14, 2014 15:37
testProject
FROM ubuntu
MAINTAINER David Weinstein <[email protected]>
# install our dependencies and nodejs
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install python-software-properties git build-essential
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get -y install nodejs
@goopi
goopi / tumblrproxy
Created September 4, 2013 17:17
An example of proxying a Tumblr blog as a subdirectory in nginx (w/o regexs)
server {
# ...
location / {
proxy_set_header Accept-Encoding '';
proxy_pass http://<NAME>.tumblr.com/;
sub_filter http://<NAME>.tumblr.com/post /post;
sub_filter_once off;
}
@mohitmayank
mohitmayank / mixpanel-amd-main.js
Last active December 20, 2015 16:38
AMD Mixpanel 2.2 Javascript Load Snippet
/*global require*/
'use strict';
require.config({
paths: {
'mixpanel' : '//cdn.mxpnl.com/libs/mixpanel-2.2.min',
},
shim: {
mixpanel: {
@IntuitDeveloperRelations
IntuitDeveloperRelations / CAD-updateInsitutionLoginWithRefreshAndEmptyCredentials.cs
Last active December 20, 2015 15:49
IPP CAD .NET SDK / UpdateInstitutionLogin passing empty credentials for refresh
int institutionLoginId = 3333; //Returned from DiscoverAndAddAccounts call
InstitutionLogin institutionLogin = new InstitutionLogin(); //Instantiate the object but do not specify credentials
Challenges challenges = new Challenges();
AggregationCategorizationService aggCategorizationService = Services.CADService.GetService(Cache, HttpContext.Current.User.Identity.Name);
aggCategorizationService.UpdateInstitutionLogin(institutionLoginId, institutionLogin, true, out challenges);
@oroce
oroce / bunyan-pipe-to-mongodb.js
Created November 10, 2012 21:29
pipe bunyan logger into mongodb (even with node-restify)
var mongoCol = require( "mongo-col" ),
mongoStream = require( "mongo-stream" ),
mongoInsertStream = mongoStream( mongoCol( "piped-collection", null, {
dbOptions:{
safe: true
}
})),
Logger = require( "bunyan" );
new Logger({