Skip to content

Instantly share code, notes, and snippets.

View hashamali's full-sized avatar

Hasham Ali hashamali

View GitHub Profile
@hashamali
hashamali / Dockerfile
Created October 28, 2019 23:24
Dockerfile for Go Builds
# Build
FROM golang:1.11-alpine
RUN apk add git
ADD . $GOPATH/src/myproject
WORKDIR $GOPATH/src/myproject
RUN go get myproject
RUN go install myproject
# Run
FROM alpine:latest
@hashamali
hashamali / main.go
Created January 19, 2019 03:36
Use UUID with GORM.
package main
import (
"fmt"
"log"
"time"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/satori/go.uuid"
@hashamali
hashamali / wsgi_custom.config
Created August 8, 2018 04:02
Elastic Beanstalk CORS Configuration
files:
"/etc/httpd/conf.d/cors.conf" :
mode: "000644"
owner: root
group: root
content: |
<Location "/">
Header set Access-Control-Allow-Origin: "https://YOURURL.IO"
Header set Access-Control-Allow-Methods: "POST, GET, PUT, DELETE, OPTIONS"
Header add Access-Control-Allow-Headers: "Authorization, Content-Type, Accept"