Skip to content

Instantly share code, notes, and snippets.

View donvito's full-sized avatar
🚀
Software Engineer coding with Go, Python and Generative AI

Melvin Vivas donvito

🚀
Software Engineer coding with Go, Python and Generative AI
View GitHub Profile
@donvito
donvito / docker-compose-stack-elasticsearch-fluentd-nginx-kibana.yml
Last active February 27, 2020 06:03
Docker stack compose files I've created. Please feel free to use! Enjoy!
version: "3.3"
services:
elasticsearch:
image: 'docker.elastic.co/elasticsearch/elasticsearch:5.6.1'
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearchvol:/usr/share/elasticsearch/data
@donvito
donvito / main.go
Last active May 21, 2018 14:33
Sample application used for debugging with delve
package main
/*Person is a struct type*/
type Person struct {
Name string
Age int
}
func main() {
@donvito
donvito / index.html
Created May 27, 2018 13:07
VueJS getting started
<script src="https://unpkg.com/vue"></script>
<div id="app">
<p>{{ message }}</p>
<span v-bind:title="message2">
Hover your mouse over me for a few seconds
to see my dynamically bound title!
</span>
</div>
@donvito
donvito / index.html
Created May 27, 2018 15:56
Query GitHub API repos using Vue.js
<script src="https://unpkg.com/vue"></script>
<div id="githubRepos">
</div>
<script>
new Vue({
el: '#githubRepos',
data: {
repos : [],
@donvito
donvito / main.go
Created October 6, 2018 15:45
Hash passwords using bcrypt library #golang
package main
import (
"fmt"
"log"
"golang.org/x/crypto/bcrypt"
)
func main() {
@donvito
donvito / main.go
Created October 7, 2018 07:30
Go Modules sample client code
package main
import (
hellomod "github.com/donvito/hellomod"
hellomodV2 "github.com/donvito/hellomod/v2"
)
func main() {
hellomod.SayHello()
hellomodV2.SayHello("Melvin")
@donvito
donvito / main.go
Created October 7, 2018 07:33
Go modules sample client which uses latest version of hellomod module
package main
import (
"github.com/donvito/hellomod"
)
func main() {
hellomod.SayHello()
}
@donvito
donvito / main.go
Created October 7, 2018 07:35
Go Modules sample client to use v2.0.0 of hellomod module
package main
import (
"github.com/donvito/hellomod/v2"
)
func main() {
hellomod.SayHello("Melvin")
}
@donvito
donvito / main.go
Created October 7, 2018 12:37
base64 encoder
package main
import (
"encoding/base64"
"fmt"
)
func main() {
msg := "melvin:melvin"
encoded := base64.StdEncoding.EncodeToString([]byte(msg))
@donvito
donvito / index.html
Created November 10, 2018 06:46
Vue.js code to query github API
<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"