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 golang:1.13.4 AS builder | |
ARG GIST_RAW_URL | |
RUN mkdir /app | |
RUN curl $GIST_RAW_URL --output /app/main.go | |
WORKDIR /app | |
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./... | |
FROM alpine:latest AS production | |
COPY --from=builder /app . | |
CMD ["./main"] |
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" | |
func main() { | |
fmt.Println("Hello universe! gist!") | |
} |
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
[ | |
{ | |
"id": 1, | |
"position": "Software Engineer", | |
"company": "Apple", | |
"description": "job description", | |
"skillsRequired": ["Go", "GraphQL"], | |
"location": "location", | |
"employmentType": "full-time" | |
}, |
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 ( | |
"net/http" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
) |
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 os, sys | |
from PIL import Image | |
size = 512, 512 | |
resizedFolder = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resized") | |
if not os.path.exists(resizedFolder): | |
os.makedirs(resizedFolder) | |
for file in os.listdir("./"): | |
if file.endswith(".jpg") or file.endswith(".jpeg") or file.endswith(".png") : |
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" | |
) | |
func main() { | |
x := 10 | |
fmt.Println(sum_i(x)) |
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
<html> | |
<head> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> | |
<div id="app"> | |
<github-repo-list | |
v-for="repo in repos" | |
v-bind:repo="repo" | |
v-bind:key="repo.name" |
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/base64" | |
"fmt" | |
) | |
func main() { | |
msg := "melvin:melvin" | |
encoded := base64.StdEncoding.EncodeToString([]byte(msg)) |
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 ( | |
"github.com/donvito/hellomod/v2" | |
) | |
func main() { | |
hellomod.SayHello("Melvin") | |
} |
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 ( | |
"github.com/donvito/hellomod" | |
) | |
func main() { | |
hellomod.SayHello() | |
} |