Skip to content

Instantly share code, notes, and snippets.

<div class="row">
{{#each loans}}
<div class="card" style="width: 18rem; height: 36rem">
<a class="card-link" href="{{id}}">
<img class="card-img-top" width="288" height="288" src="{{}}.jpg}">
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">{{name}} from {{}} is requesting {{loan_amount}} {{use}}</li>
LoanModel.find({},{},{limit: 4, sort:{timestamp:-1}}).exec(function(error, loans) {
if(error){throw error;}
for (var i = 0; i<loans.length; i++) {[i]=loans[i].toObject();
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
path = require('path'),
Cindex =require('./cindex');
mongoose.set('debug', true); // shows calls against mongoDB. Should be turned off in prod.
var loanSchema = new Schema({
loans: {
id: {
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
path = require('path');
var corruptSchema = new Schema({
corrupts: {
Country : {
type: 'String'
ISO3: {
joesavak / testing-data-load.js
Last active April 19, 2018 15:53
Testing data load into MongoDB of Kiva API data
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
//connect to local datastore
mongoose.connection.on('open', function () {
console.log('Mongoose connected');
//set schema, based on
joesavak / gist:4487004
Created January 8, 2013 19:18
mfa contract
-- V2.0 OS-MF Multi Factor Extension
<?xml version="1.0" encoding="UTF-8"?>
<auth xmlns:os-mf="">
<token id="abcdefghijklmnop"/>
<OS-MF:multifactor factor="PASSCODE" code="124398" >
joesavak / gist:4353241
Last active December 10, 2015 00:39
Rackspace Identity v2.0 XML Authentication with API key
#authentication with username & API key:
curl $identity/v2.0/tokens -d '<?xml version="1.0" encoding="UTF-8"?><auth><apiKeyCredentials xmlns="" username="USERNAME" apiKey="APIKEY" /></auth>' -H "Content-type: application/xml" -H "Accept: application/xml"
#authentication with username, API key, and tenantId:
curl $identity/v2.0/tokens -d '<?xml version="1.0" encoding="UTF-8"?><auth><apiKeyCredentials xmlns="" username="USERNAME" apiKey="APIKEY" tenantId="TENANTID" /></auth>' -H "Content-type: application/xml" -H "Accept: application/xml"
#example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
joesavak /
Created September 27, 2012 17:09
#one of many threads running to not impede migration velocity
Foreach user(@users)
setDisableFlagInGA($user) #still route to CAuth
while change
data A= getUserData($user)
sleep(61) #sleep 61 minutes
data B = getUserData($user)
joesavak /
Created September 10, 2012 21:12
Keystone and ldap
git clone
sudo apt-get install python-dev libxml2-dev libxslt1-dev libsasl2-dev libsqlite3-dev libssl-dev libldap2-dev
pip install -r tools/pip-requires
pip install -r tools/test-requires
python develop
joesavak / gist_test.conf
Created February 16, 2012 19:47
#comment blah