Skip to content

Instantly share code, notes, and snippets.

@chewmanfoo
chewmanfoo / business_units
Created December 30, 2015 21:08
trying react.dom.select
business_units = [
{
label: 'Management',
value: 'mgmt',
selected: true
},
{
label: 'Development',
value: 'dev',
selected: false
# app/assets/javascripts/components/aws_account_form.js.coffee
@AwsAccountForm = React.createClass
getInitialState: ->
name: ''
description: ''
business_unit: ''
handleChange: (e) ->
name = e.target.name
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Error from DataBinding 'hiera' while looking up 'linux_standard::packages': Permission denied - /opt/puppet/hiera/cit_master/hieradata/systemconfiguration/production/defaults.yaml at /opt/puppet/environments/cit_master/modules/linux_server/manifests/init.pp:40:3 on node i-4e9732f8.prod.aws.corpit.sabre.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
@chewmanfoo
chewmanfoo / _form.html.erb
Created July 24, 2015 00:04
Method Not Allowed
<%= form_for(@escrow_session) do |f| %>
<% if @escrow_session.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@escrow_session.errors.count, "error") %> prohibited this escrow_session from being saved:</h2>
<ul>
<% @escrow_session.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
class Archive < ActiveRecord::Base
has_one :escrow_session
delegate :name, :to => :escrow_session, :prefix => true, :allow_nil => true
validates(:crypto_key1, :crypto_key2, length: { minimum: 8 })
validate :must_archive_successfully, on: :create
# TODO: do not store encryption keys :crypto_key1, :crypto_key2 (these are in the database - need to be removed after use)
@chewmanfoo
chewmanfoo / output
Created July 2, 2015 18:39
svn ls column width
[root@ltxl0915 escrow-admin]# svn ls file:///data/escrow-data/repo/architecture_and_technology.architecture_and_technology.enterprise_data_analytics.abacus_travel_intelligence/ --verbose| grep deposit
3 SG057847 Jun 16 13:35 deposit/
[root@ltxl0915 escrow-admin]# svn log file:///data/escrow-data/repo/architecture_and_technology.architecture_and_technology.enterprise_data_analytics.abacus_travel_intelligence/deposit
------------------------------------------------------------------------
r3 | SG0578478 | 2015-06-16 13:35:08 -0500 (Tue, 16 Jun 2015) | 1 line
@chewmanfoo
chewmanfoo / production.log
Last active August 14, 2017 09:28
issue with assets - production .log shows the error, but the asset files *do* exist and are readable by everyone
I, [2015-06-14T16:05:33.765008 #49440] INFO -- : Started GET "/escrow-admin/application-5be3a6392202985945a12797cc8d137bcaf72169afe73574346ddec1b8c5ac55.js" for 127.0.0.1 at 2015-06-14 16:05:33 -0500
F, [2015-06-14T16:05:33.765753 #49440] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/escrow-admin/application-5be3a6392202985945a12797cc8d137bcaf72169afe73574346ddec1b8c5ac55.js"):
@chewmanfoo
chewmanfoo / index.html
Created June 14, 2015 15:36
assets issue production
<link rel="stylesheet" media="screen" href="/escrow-admin/application-7d9377b24d3927e30721513c3f5da3bf30abd6a30cb6a6a27042924842d6635b.css">
@chewmanfoo
chewmanfoo / application_controller.rb
Last active August 29, 2015 14:22
problems with rails and javascript?
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
end
@chewmanfoo
chewmanfoo / docker-compose.yml
Created June 9, 2015 00:03
openldap won't start only in docker-compose...
escdb:
image: postgres
ports:
- "5432"
escldap:
image: osixia/openldap
ports:
- "389:389"
- "636:636"
escsvn: