Skip to content

Instantly share code, notes, and snippets.

View cdtweb's full-sized avatar
🏠
Working from home

Clint Tyler cdtweb

🏠
Working from home
  • CDT Web Solutions, LLC
  • Murray, UT
View GitHub Profile
@gsherwood
gsherwood / ruleset.xml
Created December 5, 2014 20:06
PSR2 with tabs instead of spaces
<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
@ukcloudpro
ukcloudpro / ukcloudpro-lambda-sns-slack.js
Created April 23, 2017 10:26
AWS Lambda node.js code to pass SNS messages to Slack Webhook
var https = require('https');
var util = require('util');
var SLACK_CHANNEL = process.env.SLACK_CHANNEL;
var SLACK_PATH = process.env.SLACK_PATH;
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);