evilfactorylabs / gow Goto Github PK
View Code? Open in Web Editor NEWURL shortener for evlfctry.pro
Home Page: https://evlfctry.pro/docker
License: MIT License
URL shortener for evlfctry.pro
Home Page: https://evlfctry.pro/docker
License: MIT License
because i hate checking evlfctry.pro anytime
Currently just updated the gow docker image to latest
tag but unfortunately there is critical error that assets are not found, and I think this bug exists after we migrated to react-scripts
Overall for core functionality was worked as expected, I just rolled back the deployment to gow:0.3.0 and now everything is work seamlessly
/cc @ri7nz
Dalam menampilkan data, kita menggunakan tabel daripada elemen lain karena mengapa tidak. Dan seperti yang sudah kita tau di dunia per-tabel-an, salah satu hal yang sulit dalam membuat tabel adalah tentang bagaimana menerapakan lebar dari kolom di tabel tersebut
Yang ingin kita selesaikan disini adalah bagaimana memotong konten yang ada di salah satu kolom dengan cara memberikan lebar yang sesuai dengan lebar ideal (my mean, yes, determine by yourself by trying some random number for the width)
Sebagai contoh, bisa lihat yang memiliki latar belakang berwarna merah ini
Pada dasarnya cara menyelesaikan isu ini sepertinya hanya dengan menambahkan properti css yang ada di gambar tersebut, tapi, ya, silahkan coba sendiri!
Catatan:
Hasil dari isu ini harusnya tersendat oleh isu #16 tapi gpp usaha aja duluu
Setelah kita migrasi ke react-scripts
(dari yang sebelumnya pakai webpack murni dkk, referensi: 0642409), terjadi sebuah regresi yang salah satunya adalah tidak ter-terapkannya "styling" pada aplikasi ini
Ini belum diketahui dimana letak kesalahannya, jika kamu berjiwa petualang, Issue ini adalah untukmu!
Cobain tanya @ri7nz si manusia setengah reasonml
client is "expecting" JSON data, but when it's empty, client will crash the app. The interesting part is this code:
React.useEffect0(() => {
Js.Promise.(
fetch("/api/url/list")
|> then_(response => response##json())
|> then_(responseJSON => {
setState(_previousState => URLs(responseJSON));
Js.Promise.resolve();
})
|> catch(_err => {
setState(_previousState => ErrorFetch);
Js.Promise.resolve();
})
|> ignore
);
None;
});
}
On stats
fragments, I trick that by rejecting the promise using 204 status code:
func GetHitsStatsBySlug(db *sql.DB, w http.ResponseWriter, r *http.Request) {
params := r.URL.Query()
slug := params.Get(":slug")
payload := models.GetHitsBySlug(db, slug)
if payload == nil {
emptyData := make([]string, 0)
// FIXME: this is temporary fix to our frontend!
ResponseJSON(w, http.StatusNoContent, notFound{emptyData})
return
}
ResponseJSON(w, http.StatusOK, payload)
}
Absolutely this is not a good solution, I need to know how to handle "unexpected" response in Reason, so if the payload I need is like this:
{
"data": [{ "id": 124, "url": "https://evlfctry.pro/send-nudes" }]
}
But the given response is like this:
{
"data": null
}
How to handle that beautifully in Reason so the client will not crash?
Aslinya ini bukan kesalahan pengetikan sih tapi lebih ke kesalahan penulisan (gw yakin itu BEDA), jadi harusnya teh yang dari bagian ini, bukan GOW_TOKEN=
tapi TOKEN
aja yang walaupun belum berguna (itu env variable) tapi bikin aplikasi tersebut ga berjalan kalau belum terdefinisi dan juga bila tidak ada nilainya
Kemungkinan solusi dalam satu baris:
%s/GOW_TOKEN/TOKEN/g
sed -i 's/\bGOW_TOKEN/TOKEN/g' README.md
Jika kamu mengakses https://evlfctry.pro, kamu akan diberikan dialog otentikasi untuk username dan password (HTTP Basic) dan jika kamu memilih Cancel (atau menekan esc
di papan ketik), dialog tersebut akan hilang, dan bagaimanapun kamu dapat mengakses fragment "new" alias /#/new
yang berguna untuk membuat data baru
Bagaimanapun kamu tidak dapat menyimpan data tersebut—karena kamu belum terotentikasi, dan peladen akan memberikan kode status 401—namun ketika kamu masih bandel untuk mencoba menyimpannya, dialog otentikasi akan muncul kembali dan bila memilih Cancel, aplikasi menampilkan "succesfully saved!" yang mana itu adalah sebuah kebohongan dan bohong itu dosa ya sobat open source
Jika respon dari peladen bukan 20x, maka tampilkan pesan galat seperti "Successfully failed to save" yang intinya setidaknya jangan berbohong lah
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.