Skip to content

Instantly share code, notes, and snippets.

@chriswill0w
chriswill0w / sns-publish
Created October 25, 2017 12:47 — forked from jeremypruitt/sns-publish
AWS Lambda function to publish to SNS topic
console.log('Loading function');
var AWS = require('aws-sdk');
AWS.config.region = 'us-west-2';
exports.handler = function(event, context) {
console.log("\n\nLoading handler\n\n");
var sns = new AWS.SNS();
sns.publish({
@chriswill0w
chriswill0w / aws-sns-example.js
Created October 25, 2017 12:47 — forked from tmarshall/aws-sns-example.js
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@chriswill0w
chriswill0w / Obfuscator.swift
Last active June 16, 2026 15:39 — forked from DejanEnspyra/Obfuscator.swift
Obfuscation of hard-coded security-sensitive strings.
protocol ObfuscatorProtocol {
#if DEBUG
func bytesByObfuscatingString(_ string: String) -> [UInt8]
#endif
func reveal(_ key: [UInt8]) -> String
}
class Obfuscator: ObfuscatorProtocol {
// MARK: - Variables