Skip to content

Instantly share code, notes, and snippets.

Avatar

Nielvid nielvid

View GitHub Profile
@nielvid
nielvid / hasMany.go
Created Jun 7, 2022 — forked from jtbonhomme/hasMany.go
Gorm example of foreign key definition for a hasMany relation
View hasMany.go
package main
import (
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
)
// Customer ...
type Customer struct {
@nielvid
nielvid / docker_nodejs.sh
Last active May 24, 2022
Install Docker nginx and Nodejs@16.15.0 on ubuntu
View docker_nodejs.sh
#!/bin/bash
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
@nielvid
nielvid / cloudSettings
Last active Jan 4, 2022 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL
View cloudSettings
{"lastUpload":"2022-01-04T15:01:55.480Z","extensionVersion":"v3.4.3"}
@nielvid
nielvid / countries.json
Created Aug 3, 2021 — forked from keeguon/countries.json
A list of countries in JSON
View countries.json
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},