Skip to content

Instantly share code, notes, and snippets.

View kevinmmartins's full-sized avatar

Kevin Martins kevinmmartins

View GitHub Profile
@kevinmmartins
kevinmmartins / email-scalar-type.js
Last active March 8, 2020 12:54
Apollo GraphQL Email Scalar Type
import { gql } from 'apollo-server-express'
import { GraphQLError } from 'graphql/error'
import { Kind } from 'graphql/language'
const EMAIL_REGEX = new RegExp(
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
)
const Email = gql`
"Scalar data representing email"
@kevinmmartins
kevinmmartins / docker-compose-node-mongo.yml
Created October 28, 2018 15:39
Docker compose to a Node application with MongoDB
services:
thing-provider-service:
image: node
working_dir: /usr/src/app
volumes:
- ./:/usr/src/app
command: bash -c "npm install && npm start"
ports:
- "3002:3002"
depends_on:
@kevinmmartins
kevinmmartins / cloudformation-beanstalk-cloudfront.json
Last active March 4, 2019 17:52
Cloudformation with Beanstalk and CloudFront
{
"AWSTemplateFormatVersion":"2010-09-09",
"Metadata":{
"AWS::CloudFormation::Interface":{
"ParameterGroups":[
{
"Label":{
"default":"Application version"
},
"Parameters":[
@kevinmmartins
kevinmmartins / cloudformation-spring-dynamo-beanstalk.json
Last active March 4, 2019 17:53
Cloudformation to a Java application using Beanstalk and DynamoDB
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"ApplicationBucket": {
"Type": "String",
"Description": "The bucket name with artifact"
},
"ApiKey": {
"Type": "String",
"Description": "The API key to make requests to server"
@kevinmmartins
kevinmmartins / Convert-JAR-To-Bundle.md
Last active March 4, 2019 17:52
Servicemix - Convert jar into bundle

Convert a JAR to bundle

Run command

./bin/servicemix

Linux