Skip to content

Instantly share code, notes, and snippets.

View roes888's full-sized avatar
💰
Available for hire!

Roes W roes888

💰
Available for hire!
  • Yogyakarta, DIY, Indonesia
  • 08:59 (UTC +07:00)
View GitHub Profile
@roes888
roes888 / problem-solve.txt
Created November 28, 2019 16:48
[FIX] Failed to connect to the newrelic-daemon
I spent 2 hours+ and got stress about this issue: warning: daemon connect(fd=5 uds=/tmp/.newrelic.sock) returned -1 errno=ECONNREFUSED. Failed to connect to the newrelic-daemon. Please make sure that there is a properly configured newrelic-daemon running. For additional assistance, please see: https://newrelic.com/docs/php/newrelic-daemon-startup-modes
These are the steps to solve the issue:
> Check process using command: ps aux | grep newrelic
> Kill all newrelic-daemon process.
> Restart web server using command: service php-fpm restart && service nginx restart
> Newrelic daemon will automatically restart.
And, voila! (:
@roes888
roes888 / index.js
Created October 30, 2020 00:47
Lambda function
const AWS = require('aws-sdk');
const ssm = new AWS.SSM();
const SSM_DOCUMENT_NAME = process.env.SSM_DOCUMENT_NAME;
const SNS_TARGET = process.env.SNS_TARGET;
function sleep(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}