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
#!/bin/sh | |
# Generate self signed root CA cert | |
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]" | |
# Generate server cert to be signed | |
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]" | |
# Sign the server cert |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"apigateway:*", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:ContinueUpdateRollback", | |
"cloudformation:CreateChangeSet", | |
"cloudformation:CreateStack", | |
"cloudformation:CreateUploadBucket", |
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/env ruby | |
require 'sidekiq' | |
require 'sidekiq/cli' | |
# Default to running one process per core | |
def process_count | |
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0 | |
case RbConfig::CONFIG['host_os'] |
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
desc "Rename this application" | |
task :rename, [:name] => :environment do |t, args| | |
files = Dir.glob(%w(rb yml).map{ |ext| Rails.root.join("**/*.#{ext}") } + %w(Rakefile)) | |
before = Rails.application.class.name.split('::').first | |
after = args.name or raise "Pass a new name as an argument: $ rake rename[MyCivicApp]" | |
files.each do |file| | |
# Swap in the new name | |
renamed = File.read(file).gsub(/#{before}/, after).gsub(/#{before.underscore}/, after.underscore) | |
# Write the updated contents |
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
/*globals React, Turbolinks*/ | |
/* Modified react_ujs to prevent the components polluting global scope whenever possible. | |
* Since I use subdirs for my components, it also flattens the structure making | |
* _componentStore[className] possible. | |
* Creds for the react_ujs.js file to the people from react-rails (https://github.com/reactjs/react-rails) | |
*/ | |
var path = require('path'); |