This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use LWP::Simple; | |
my $url = 'http://site/files'; | |
my $file = 'fileName'; | |
getstore( "$url/$file", $file ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoanModel.find({},{},{limit: 4, sort:{timestamp:-1}}).exec(function(error, loans) { | |
if(error){throw error;} | |
for (var i = 0; i<loans.length; i++) { | |
viewModel.loans[i]=loans[i].toObject(); | |
} | |
res.render('index',viewModel); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, | |
path = require('path'); | |
var corruptSchema = new Schema({ | |
corrupts: { | |
Country : { | |
type: 'String' | |
}, | |
ISO3: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
//connect to local datastore | |
mongoose.connect('mongodb://localhost/kivaDB'); | |
mongoose.connection.on('open', function () { | |
console.log('Mongoose connected'); | |
}); | |
//set schema, based on https://transform.now.sh/json-to-mongoose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================================================== | |
======================================================== | |
-- V2.0 OS-MF Multi Factor Extension | |
======================================================== | |
XML | |
<?xml version="1.0" encoding="UTF-8"?> | |
<auth xmlns:os-mf="http://docs.openstack.org/identity/api/ext/OS-MF/v1.0"> | |
<token id="abcdefghijklmnop"/> | |
<OS-MF:multifactor factor="PASSCODE" code="124398" > | |
</auth> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#authentication with username & API key: | |
curl $identity/v2.0/tokens -d '<?xml version="1.0" encoding="UTF-8"?><auth><apiKeyCredentials xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0" 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="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0" 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"?> | |
<access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#one of many threads running to not impede migration velocity | |
Foreach user(@users) | |
migrate($user) | |
setDisableFlagInGA($user) #still route to CAuth | |
$change=true | |
while change | |
data A= getUserData($user) | |
sleep(61) #sleep 61 minutes | |
data B = getUserData($user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/openstack/keystone.git | |
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 setup.py develop | |
#links | |
#http://adam.younglogic.com/2012/02/openstack-keystone-ldap-redux/ | |
#http://www.youtube.com/watch?v=Istj0_-BwmQ |
NewerOlder