Skip to content

Instantly share code, notes, and snippets.

View mozarik's full-sized avatar
Im still learning new thing , and always be

Zein Fahrozi mozarik

Im still learning new thing , and always be
View GitHub Profile
mozarik / read.txt
Created March 31, 2022 10:34
Read This File
Hello! congratulations you can read me :D
mozarik / rowscan.go
Created October 6, 2021 12:13
Rows Scan Gorm
func (repo QuoteRepo) FindUserFavorites(userID int) ([]domain.Quote, error) {
query := `SELECT, q.body,, q.quote_source FROM quotes q
JOIN userfavoritesquotes on ( = userfavoritesquotes.quote_id)
JOIN users ON ( = userfavoritesquotes.user_id)
WHERE = @userID`
rows, err := repo.DB.Debug().Raw(query, sql.Named("userID", userID)).Rows()
if err != nil {
return nil, err
mozarik / models.go
Last active June 20, 2021 16:22
Example of Models in GORM
package model
import ""
type User struct {
Username string
Password string
Role string
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mozarik / error_message
Created March 2, 2021 13:15
Coursera Week 7 Grade Assesment
import re
import operator
import pprint
import operator
import collections
import csv
# 1.The rankking of errors generated by the system
import os
from PIL import Image
OUTPUT_FILE_PATH = "./opt/icons/"
ORIGINAL_FILE_PATH = "./images/"
FILL_COLOR = (120, 8, 220)
mozarik / cookie.go
Last active January 13, 2021 00:48