This file contains hidden or 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
# | |
# Rules that can scan a CloudFormation ChangeSet and report a failure if a DynamoDB Table will be replaced | |
# | |
# Find config-lint here: https://github.com/stelligent/config-lint | |
# | |
# Example usage: | |
# | |
# aws cloudformation describe-change-set --stack-name <STACK_NAME> --change-set-name <CHANGESET_NAME> | | |
# config-lint -rules rules.yml - | |
# |
This file contains hidden or 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
from cfnlint import CloudFormationLintRule | |
from cfnlint import RuleMatch | |
import yaml | |
import jmespath | |
class MyCheck(CloudFormationLintRule): | |
"""MyCheck""" | |
id = 'E737' | |
shortdesc = 'Check Something' |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'rails', '3.2.9' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'redis' | |
gem 'cf-runtime' | |
This file contains hidden or 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
source 'http://rubygems.org' | |
gem 'sinatra' | |
gem 'thin' | |
gem 'rack' |
This file contains hidden or 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 connect = require('connect'), | |
mongodb = require('mongodb'); | |
var showDBInfo = function(req,res) { | |
res.end("You are connected to the database"); | |
}; | |
var noDatabaseError = function(res) { | |
res.statusCode = 500; | |
res.end("Unable to connect to database"); |
This file contains hidden or 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 connect = require('connect'), | |
fs = require('fs'); | |
var serve_html = function(root) { | |
return function(req,res,next) { | |
var path = root + req.url + '.html'; | |
fs.stat(path,function(err,stat) { | |
if (!err && !stat.isDirectory()) { | |
res.statusCode = 301; | |
res.setHeader('Location', req.url + '.html'); |
This file contains hidden or 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
<h1>Test MySQL Connection</h1> | |
<?php | |
$services = getenv("VCAP_SERVICES"); | |
$services_json = json_decode($services,true); | |
$mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
// ** MySQL settings from resource descriptor ** // | |
$username = $mysql_config["username"]; |
This file contains hidden or 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
<?php echo "Hello" ?> |
This file contains hidden or 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
source 'http://rubygems.org' | |
gem 'sinatra' | |
NewerOlder