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": "Choose wisely! Comment why!", | |
"Image": "https://img-9gag-fun.9cache.com/photo/apQVjGb_460s.jpg" | |
}, | |
{ | |
"Description": "When you get to hot", | |
"Image": "https://img-9gag-fun.9cache.com/photo/aVMVE08_460s.jpg" | |
}, | |
{ |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func HomeEndpoint(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintln(w, "Hello world :)") |
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
# GOROOT is the location where Go package is installed on your system | |
export GOROOT=/usr/lib/golang | |
# GOPATH is the location of your work directory | |
export GOPATH=$HOME/projects | |
# PATH in order to access go binary system wide | |
export PATH=$PATH:$GOROOT/bin |
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/bash | |
yum install -y httpd | |
service httpd start | |
chkconfig httpd on | |
echo “<html><h2>Hello from mlabouardy</h2></html>” > /var/www/html/index.html |
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
'use strict'; | |
var AWS = require('aws-sdk'), | |
uuid = require('uuid'), | |
documentClient = new AWS.DynamoDB.DocumentClient(); | |
exports.writeMovie = function(event, context, callback){ | |
var params = { | |
Item : { | |
"Id" : uuid.v1(), |
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
'use strict'; | |
var AWS = require('aws-sdk'), | |
documentClient = new AWS.DynamoDB.DocumentClient(); | |
exports.readAllMovies = function(event, context, callback){ | |
var params = { | |
TableName : process.env.TABLE_NAME | |
}; | |
documentClient.scan(params, function(err, data){ |
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
'use strict'; | |
var mg = require('mailgun-js')({ | |
apiKey: process.env.MAILGUN_API_KEY || 'YOUR_API_KEY', | |
domain: process.env.MAILGUN_DOMAIN || 'DOMAIN_NAME' | |
}); | |
exports.sendEmail = function(event, context, callback){ | |
mg.messages().send({ | |
from: '[email protected]', | |
to: '[email protected]', |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [{ | |
"Effect": "Allow", | |
"Principal": { "AWS" : "*" }, | |
"Action": "sts:AssumeRole" | |
}] | |
} |
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
version: "2" | |
services: | |
influxdb: | |
container_name: influxdb | |
image: influxdb:1.0.2 | |
ports: | |
- "8083:8083" | |
- "8086:8086" | |
volumes: | |
- /home/core/volumes/influxdb:/var/lib/influxdb |
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
# Read metrics about CPU usage | |
[[inputs.cpu]] | |
percpu = false | |
totalcpu = true | |
fieldpass = [ "usage*" ] | |
name_suffix = "_vm" | |
# Read metrics about disk usagee | |
[[inputs.disk]] | |
fielddrop = [ "inodes*" ] |