Skip to content

Instantly share code, notes, and snippets.

@dericcrago
dericcrago / conjur_and_ansible_getting_started.md
Created August 7, 2018 14:28
Conjur and Ansible Getting Started

Environment Setup

curl -o docker-compose.yml https://www.conjur.org/get-started/docker-compose.quickstart.yml
sed -i '' "s/^version: '2'$/version: '2.2'/g" docker-compose.yml 
sed -i '' '/^      CONJUR_ACCOUNT:$/d' docker-compose.yml 
sed -i '' '/^      CONJUR_AUTHN_API_KEY:$/d' docker-compose.yml 
sed -i '' '/^      CONJUR_AUTHN_LOGIN: admin$/d' docker-compose.yml 
docker-compose pull

Keybase proof

I hereby claim:

  • I am dericcrago on github.
  • I am dericcrago (https://keybase.io/dericcrago) on keybase.
  • I have a public key ASDFE9Y6beWaV5BKjxDl3IXwA5_GAd5u4T3YwQszz_4_Rwo

To claim this, I am signing this object:

@dericcrago
dericcrago / KinveyCollection.js
Created March 15, 2012 05:31 — forked from bhang/KinveyCollection.js
KinveyCollection
// Credentials for use with Kinvey
// NOTE: This example shows passing in the master secret.
// In a production environment, these credentials should be protected i.e.
// they should be requested from the user or secured via a login screen
var kinvey_app_key = 'kidxxxx';
var kinvey_secret = 'master secret';
// Define .ajax Defaults
$.ajaxSetup({
beforeSend: function(jqXHR) {
@dericcrago
dericcrago / gist:1886177
Created February 22, 2012 17:25
add trailing slash to Backbone.Model urls
// example
User = Backbone.Model.extend({
url: function() {
var origUrl = Backbone.Model.prototype.url.call(this);
return origUrl + (origUrl.charAt(origUrl.length - 1) == '/' ? '' : '/');
}
});
Base.TemplateContext = {};
Base.Views.Layout = Backbone.View.extend({
initialize: function() {
this.setViews(_.extend({}, this.views, this.options.views));
if (this.options.template) {
this.template = this.options.template;
}
this.templateContext = _.extend({}, Base.TemplateContext, this.templateContext);
@dericcrago
dericcrago / resources.py
Created February 11, 2012 13:13
display the projects field if it was a ``detail`` response
from tastypie import fields
from tastypie.resources import ModelResource
from company.models import Company
class CompanyResource(ModelResource):
"""
Tastypie resource for Company
"""
class Meta:
@dericcrago
dericcrago / validations.py
Created February 9, 2012 13:42
Form Validations with Instances
from tastypie.validation import FormValidation
class InstanceFormValidation(FormValidation):
def is_valid(self, bundle, request=None):
errors = {}
data = bundle.data
instance = bundle.obj
@dericcrago
dericcrago / application.js
Created January 16, 2012 20:00
backbone.layoutmanager screencast source updates to work with backbone.layoutmanager v0.0.4
this.twitter = {
// Create this closure to contain the cached modules
module: function() {
// Internal module cache.
var modules = {};
// Create a new module reference scaffold or load an
// existing module.
return function(name) {
// If this module has already been created, return it.