function test() {
let array = ["email","groups_access_member_info","publish_to_groups","user_age_range","user_birthday","user_events","user_friends","user_gender","user_hometown","user_likes","user_link","user_location","user_photos","user_posts","user_tagged_places","user_videos"];
return `${array}`;
}
This file contains 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
const Sentry = require('@sentry/node'); | |
Sentry.init({ dsn: process.env.SENTRY_DSN, environment: 'staging' }); | |
Sentry.captureException(new Error('Test from local')); |
This file contains 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
const nodemailer = require("nodemailer"); | |
const mandrillTransport = require('nodemailer-mandrill-transport'); | |
const smtpTransport = nodemailer.createTransport(mandrillTransport({ | |
auth: { | |
apiKey : 'your-token' | |
} | |
})); | |
const mailData = { |
This file contains 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
<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--> | |
<!--<html xmlns="http://www.w3.org/1999/xhtml">--> | |
<!--<head>--> | |
<!-- <title>Test Layout</title>--> | |
<!-- <style type="text/css">--> | |
<!-- body, html--> | |
<!-- {--> | |
<!-- margin: 0; padding: 0; height: 100%; overflow: hidden;--> | |
<!-- }--> |
This file contains 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
/** | |
* @description Runs getUser() in sequential. | |
* @return {Promise<void>} | |
*/ | |
async function example() { | |
for (let i = 0; i < 10; i++) { | |
await getUser(); | |
} | |
} |
This file contains 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
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
AWS.config.update({ accessKeyId: 'ACCESSKEYID', secretAccessKey: 'SECRETACCESSKEY', region: 'eu-west-3'}); | |
const fileStream = fs.createReadStream('/path/to/your/image.png'); | |
fileStream.on('error', function (err) { | |
if (err) { throw err; } | |
}); |
This file contains 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
#!/bin/sh | |
# Install common and docker | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository "deb https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" | |
apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}') | |
# Install kubelet, kubeadm kubectl |