Skip to content

Instantly share code, notes, and snippets.

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

Artem Nikolaienko nakolkin

🏠
Working from home
View GitHub Profile
@nakolkin
nakolkin / heredoc-dockerfile.snip
Created October 19, 2017 12:38 — forked from abn/heredoc-dockerfile.snip
Dockerfile alternatives for heredoc
#printf
RUN printf '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
>> /tmp/hello
#echo
RUN echo -e '#!/bin/bash\n\
echo hello world from line 1\n\
echo hello world from line 2'\
@nakolkin
nakolkin / sendsqs.js
Created February 16, 2018 13:55
AWS Lambda sample: Send received events to SQS as Message
var QUEUE_URL = 'https://sqs.us-east-1.amazonaws.com/{AWS_ACCUOUNT_}/matsuoy-lambda';
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({region : 'us-east-1'});
exports.handler = function(event, context) {
var params = {
MessageBody: JSON.stringify(event),
QueueUrl: QUEUE_URL
};
sqs.sendMessage(params, function(err,data){