https://github.com/albertomh/py-gmail-scrape https://developers.google.com/gmail/api/v1/reference/users/messages/attachments/get
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
# Logs weren't giving me any clues. | |
# So I scaled down and scaled back up the dynos. | |
#This solved the problem for me: | |
heroku ps:scale web=0 | |
# Waited a few seconds... | |
sleep(4) | |
heroku ps:scale web=1 |
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
#!/bin/bash | |
while p= read -r line; do | |
heroku config:set $line | |
done < ./.env |
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
https://muffinman.io/uploading-files-using-fetch-multipart-form-data/ |
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 views | |
import ( | |
"encoding/json" | |
"errors" | |
"net/http" | |
log "github.com/sirupsen/logrus" | |
pkg "github.com/L04DB4L4NC3R/jobs-mhrd/pkg" |
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 errors | |
import ( | |
"errors" | |
) | |
var ( | |
ErrNotFound = errors.New("Error: Document not found") | |
ErrNoContent = errors.New("Error: Document not found") | |
ErrInvalidSlug = errors.New("Error: Invalid slug") |
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 handler | |
import ( | |
"encoding/json" | |
"net/http" | |
"github.com/L04DB4L4NC3R/jobs-mhrd/api/middleware" | |
"github.com/L04DB4L4NC3R/jobs-mhrd/api/views" | |
"github.com/L04DB4L4NC3R/jobs-mhrd/pkg/user" | |
"github.com/dgrijalva/jwt-go" |
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 user | |
import ( | |
"context" | |
"crypto/md5" | |
"encoding/hex" | |
"errors" | |
) | |
type Service interface { |
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 user | |
import ( | |
"context" | |
) | |
type Repository interface { | |
FindByID(ctx context.Context, id uint) (*User, error) | |
BuildProfile(ctx context.Context, user *User) (*User, error) |
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 user | |
import "github.com/jinzhu/gorm" | |
type User struct { | |
gorm.Model | |
FirstName string `json:"first_name,omitempty"` | |
LastName string `json:"last_name,omitempty"` | |
Password string `json:"password,omitempty"` | |
PhoneNumber string `json:"phone_number,omitempty"` |