Automatic add
This commit is contained in:
parent
ffe66dae74
commit
54818eb0e5
6
.bashrc
6
.bashrc
|
@ -1,4 +1,4 @@
|
|||
alias l='ls -larthF --color=auto'
|
||||
alias l='ls -lArthF --color=auto'
|
||||
alias v='vim'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
@ -214,7 +214,7 @@ timo_moulinette () {
|
|||
prev () {
|
||||
if [ -z "${1}" ] ; then
|
||||
ex="$(basename "${PWD}")"
|
||||
ex_num="$(printf '%s' "${ex}" | cut -c3-)"
|
||||
ex_num="$(printf '%s' "${ex}" | cut -c3- | sed 's/^0*//g')"
|
||||
next_ex_num="$(( ${ex_num} - 1 ))"
|
||||
else
|
||||
next_ex_num="${1}"
|
||||
|
@ -231,7 +231,7 @@ next () {
|
|||
ex="$(basename "${PWD}")"
|
||||
|
||||
# Exercise num
|
||||
ex_num="$(printf '%s' "${ex}" | cut -c3-)"
|
||||
ex_num="$(printf '%s' "${ex}" | cut -c3- | sed 's/^0*//g')"
|
||||
|
||||
# + 1 for next
|
||||
next_ex_num="$(( ${ex_num} + 1 ))"
|
||||
|
|
36
autoslot.sh
36
autoslot.sh
|
@ -10,24 +10,24 @@ for i in $(seq ${ITERS}); do
|
|||
printf '\033[33m%s\033[m\n' "Iter: ${i} / ${ITERS}"
|
||||
printf '\033[32m%s\033[m\n' "$(date)"
|
||||
printf '\033[34m%s\033[m\n' "Next ${HEAD} Slots Open At:"
|
||||
curl 'https://projects.intra.42.fr/projects/c-piscine-shell-01/slots.json?team_id=4775806&start=2023-03-27&end=2023-04-03' \
|
||||
-H 'authority: projects.intra.42.fr' \
|
||||
-H 'accept: application/json, text/javascript, */*; q=0.01' \
|
||||
-H 'accept-language: en-US,en;q=0.6' \
|
||||
-H 'cookie: user.id=MTQ3ODQ1--2ed4a01852220e3253f40a3457511a8ae91ca457; _intra_42_session_production=8974045809c7675897d87f107c8351d5' \
|
||||
-H 'if-none-match: W/"43b2f38b05d34ca320bad62295013cf5"' \
|
||||
-H 'referer: https://projects.intra.42.fr/projects/c-piscine-shell-01/slots?team_id=4776317' \
|
||||
-H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Brave";v="110"' \
|
||||
-H 'sec-ch-ua-mobile: ?0' \
|
||||
-H 'sec-ch-ua-platform: "Linux"' \
|
||||
-H 'sec-fetch-dest: empty' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'sec-fetch-site: same-origin' \
|
||||
-H 'sec-gpc: 1' \
|
||||
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
|
||||
-H 'x-csrf-token: PPqEuvdjwNwubP4y3JYC09t95FZLTRUOalFJ/GhYDsvvwVLTHxudjTpP2ixi2GndpqhzDlR7PIbLuaKNFaQ3RQ==' \
|
||||
-H 'x-requested-with: XMLHttpRequest' \
|
||||
--compressed \
|
||||
curl 'https://projects.intra.42.fr/projects/c-piscine-c-03/slots.json?team_id=4765253&start=2023-03-27&end=2023-04-03' \
|
||||
-H 'authority: projects.intra.42.fr' \
|
||||
-H 'accept: application/json, text/javascript, */*; q=0.01' \
|
||||
-H 'accept-language: en-US,en;q=0.9' \
|
||||
-H 'cookie: user.id=MTQ3ODQ1--2ed4a01852220e3253f40a3457511a8ae91ca457; _intra_42_session_production=8974045809c7675897d87f107c8351d5' \
|
||||
-H 'if-none-match: W/"33359ca08f043e68fed0539fde8eb619"' \
|
||||
-H 'referer: https://projects.intra.42.fr/projects/c-piscine-c-03/slots?team_id=4776381' \
|
||||
-H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Brave";v="110"' \
|
||||
-H 'sec-ch-ua-mobile: ?0' \
|
||||
-H 'sec-ch-ua-platform: "Linux"' \
|
||||
-H 'sec-fetch-dest: empty' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'sec-fetch-site: same-origin' \
|
||||
-H 'sec-gpc: 1' \
|
||||
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
|
||||
-H 'x-csrf-token: AwojxwZZtk8a+NNB5MnHP5DLbPR36tbHAvWek6ytX4zQMfWu7iHrHg7b919ah6wx7R77rGjc/0+jHXXi0VFmAg==' \
|
||||
-H 'x-requested-with: XMLHttpRequest' \
|
||||
--compressed \
|
||||
-s |
|
||||
jq '.[].start' -r |
|
||||
tr 'T' ' ' |
|
||||
|
|
Loading…
Reference in New Issue