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 ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
"github.com/jinzhu/gorm" |
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
var request = require('request'); | |
var blc = require('broken-link-checker'); | |
exports.handler = function(event, context, callback) { | |
let response = { | |
status: 'success', | |
links: [], | |
brokenLinks: [] | |
}; |
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 ( | |
"log" | |
"net" | |
"net/url" | |
time "time" | |
"github.com/aws/aws-lambda-go/lambda" | |
) |
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
import urllib.request | |
import os | |
import time | |
def lambda_handler(event, context): | |
request = urllib.request.Request(event['Url']) | |
try: | |
start_time = time.time() | |
urllib.request.urlopen(request) |
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 ( | |
"log" | |
"net" | |
time "time" | |
"github.com/aws/aws-lambda-go/lambda" | |
) | |
type Request struct { |
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
from datetime import date, timedelta | |
from aiohttp import web | |
import aiohttp_cors | |
import boto3 | |
import re | |
app = web.Application() | |
cors = aiohttp_cors.setup(app) | |
AWS_ACCESS_KEY_ID='' |
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
import urllib.request | |
import os | |
def lambda_handler(event, context): | |
request = urllib.request.Request(os.getenv('URL', '')) | |
try: | |
urllib.request.urlopen(request) | |
print() | |
except urllib.error.HTTPError as e: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.springframework</groupId> | |
<artifactId>gs-rest-service</artifactId> | |
<version>0.1.0</version> | |
<parent> |
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
FROM openjdk:8-jdk-alpine | |
VOLUME /tmp | |
ADD target/gs-rest-service-0.1.0.jar app.jar | |
ENV JAVA_OPTS="" | |
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar |
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
FROM python:2.7-slim | |
WORKDIR /app | |
ADD . /app | |
RUN pip install -r requirements.txt | |
EXPOSE 80 | |
ENV NAME World | |
CMD ["python", "app.py"] |