Skip to content

Instantly share code, notes, and snippets.

View deekoder's full-sized avatar

Dee Koder deekoder

View GitHub Profile
* Currently online : User name engineers only.
(sort by online ones and keep the offline users grayed out)
* Total count of messages sent (last 100 days)
* Last activity : time per user
@deekoder
deekoder / Support Network
Created November 8, 2017 00:33
Support Site Must Hves
What should a support product entail :
* Customer Portal : Create account with moderation.
* Should be able to learn what they will get without having to login
* License Management
* Service plans levels (if there are more than 1)
* Hours of coverage
* Scope of coverage
* How to do escalations
* Whats not covered
* Remove Maps and replace with Website Map
* Enhance the data. Create a new db. For every entry requery APIS and enrich. Point to new database eventually.
-X-
* Advanced search model with dynamic dropdowns
* Widgets for canned queries such as : 1. Popular platforms.
@deekoder
deekoder / Error Logging Pod
Created October 31, 2017 19:34
Things to do wrt to error messages pod.
- json flag in CLI to get json output
- Remove file in config.json and upgrade version (migration code)
- Log messages : remove logrus dependencyl
- 2 separate structs for logging and startup
- Levels of logging:
- Error
- Fatal
- Debug
- Research json grouping of similar messages (50 times ): <same error message>
@deekoder
deekoder / config.json
Created October 18, 2017 01:35
config.json for minio server
{
"version": "19",
"credential": {
"accessKey": "minio",
"secretKey": "minio123"
},
"region": "",
"browser": "on",
"logger": {
"console": {
@deekoder
deekoder / lambdaEvent.go
Created October 17, 2017 17:04
Lambda Function to do OCR and Barcode analysis
func processOCR(minioClient *minio.Client, bucketname string, objectname string) string {\
// This is the simplest way :)
object, err := minioClient.GetObject(bucketname, objectname, minio.GetObjectOptions{})
if err != nil {
fmt.Println(err)
return ""
}
localFile, err := os.Create("/tmp/" + objectname)
if err != nil {
@deekoder
deekoder / SetBucketNotification.go
Created October 17, 2017 16:56
Sets up a bucket notification to Postgres
func setUp() {
minioClient, err := minio.New("192.168.1.15:9000", "minio", "minio123", false)
if err != nil {
log.Fatalln(err)
}
queueArn := minio.NewArn("minio", "sqs", "", "1", "postgresql")
queueConfig := minio.NewNotificationConfig(queueArn)
queueConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll)
bucketNotification := minio.BucketNotification{}
bucketNotification.AddQueue(queueConfig)
@deekoder
deekoder / Uploader.go
Last active October 17, 2017 23:12
Uploading Images to Minio from Trichorder Ap
func upload(w http.ResponseWriter, r *http.Request) {
file, header, err := r.FormFile("file")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer file.Close()
fname := header.Filename
 gcloud init
  • If you are reauthenticating use this command instead
gcloud beta auth application-default login
  • Perform the authentication using your minio.io email address (the CLI will launch a broswer window or show you a link)
Fresh Install
Installing Minio packages for macOS is done via brew.
```
brew install minio/stable/minio
minio server ~/Photos
```
Upgrade