# Sprout.tw System Notes - `root@sprout.tw` - nginx - Postgres - CMS - TODO: How to create a contest - TODO: Why are there so many workers? - Homepage and registration - Backend API (`Watch.py` & `Server.py`) - Redirections to course pages - `root@neoj.sprout.tw` - NEOJ - Postgres - `root@172.105.226.88` - Start judge worker: `insmod /srv/sptoj-judge/judge/kern/clear_unkillable.ko; docker run -p 2501:2501 -v /srv/sptoj-judge/judge:/judge -v /srv/sptoj-judge/remote/code:/code -v /srv/sptoj-judge/remote/problem:/problem --privileged=true --memory=2560m --memory-swap=2560m --memory-reservation=1280m --memory-swappiness=0 -it judger:v2-py3.8a /bin/bash -c 'cd /judge; ./Server.py; exec /bin/bash'` - Rejudge submission: `curl 'https://neoj.sprout.tw/api/challenge/rejudgechal' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://neoj.sprout.tw/rank/' -H 'Content-Type: application/json;charset=utf-8' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Cookie: token=TOKEN' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --request POST --data '{"challenge_uid":'$id'}'` - Change user info: `curl 'https://neoj.sprout.tw/api/user/1655/set' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://neoj.sprout.tw' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://neoj.sprout.tw/profile/setting' -H 'Cookie: token=TOKEn' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data '{"uid":1655,"name":"Ming-Xuan Shi","password":"i_forgot_my_password_how_embarrassing"}'` TODO: Sync local repos and BitBucket > TODO: TASK_MAXCONCURRENT , task emit queue => checker 跟 task 要>一起出去 關於neoj的幾點建議(抱怨): collection的排序能不能降序或是依照年分降序 status有辦法只query某個班級的提交嗎 有沒有介面可以看到班級整體的作答狀況(某題多少人AC / 班級總人數) 補充: user的設定,後面的save可以做一個回饋提示,也可以加個 onhover 和 onclick 的 css 同個畫面的 delete 選項可以做一個提示框,避免誤按