Compare commits
4 Commits
150e7d4ff0
...
34b2fd5f86
| Author | SHA1 | Date |
|---|---|---|
|
|
34b2fd5f86 | |
|
|
5382e0e64f | |
|
|
7eeba03a09 | |
|
|
694a6e4acc |
11
.bashrc
11
.bashrc
|
|
@ -22,6 +22,15 @@ xset r rate 200 60
|
||||||
|
|
||||||
PATH="${PATH}:/nfs/homes/tischmid/.local/bin"
|
PATH="${PATH}:/nfs/homes/tischmid/.local/bin"
|
||||||
|
|
||||||
|
if [ -f ~/git-prompt.sh ]; then
|
||||||
|
. ~/git-prompt.sh
|
||||||
|
else
|
||||||
|
source <(curl --silent --location 'https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh')
|
||||||
|
fi
|
||||||
|
|
||||||
|
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||||
|
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\][\w]\[\033[m\]\[\033[36m\]$(__git_ps1 " (%s)")\[\033[m\]\n$ '
|
||||||
|
|
||||||
##-----------------------------------------------------
|
##-----------------------------------------------------
|
||||||
## synth-shell-greeter.sh
|
## synth-shell-greeter.sh
|
||||||
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-greeter.sh ] && [ -n "$( echo $- | grep i )" ]; then
|
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-greeter.sh ] && [ -n "$( echo $- | grep i )" ]; then
|
||||||
|
|
@ -34,9 +43,7 @@ fi
|
||||||
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
|
if [ -f /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
|
||||||
:
|
:
|
||||||
# source /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh
|
# source /nfs/homes/tischmid/.config/synth-shell/synth-shell-prompt.sh
|
||||||
# PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\]\w\[\033[m\]\n$ '
|
|
||||||
fi
|
fi
|
||||||
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\]\w\[\033[m\]\n$ '
|
|
||||||
|
|
||||||
##-----------------------------------------------------
|
##-----------------------------------------------------
|
||||||
## better-ls
|
## better-ls
|
||||||
|
|
|
||||||
46
autoslot.sh
46
autoslot.sh
|
|
@ -1,15 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PROJECT_NAME='c-piscine-c-02'
|
|
||||||
START='2023-03-20'
|
|
||||||
END='2023-03-27'
|
|
||||||
TEAM_ID='4767869'
|
|
||||||
API="https://projects.intra.42.fr/projects/${PROJECT_NAME}/slots.json"
|
|
||||||
PARAMETERS="?team_id=${TEAM_ID}&start=${START}&end=${END}"
|
|
||||||
FULL_COOKIE='cookie: user.id=MTQ3ODQ1--2ed4a01852220e3253f40a3457511a8ae91ca457; _intra_42_session_production=bea76bc0dd96771867156f2e827a8472'
|
|
||||||
FULL_CSRF_TOKEN='x-csrf-token: V0LuxOHdvRv+52H0ax3CPPIZmoWoCDUMoyayLoRhC6APF5oGEZH/zf20lmP4aVC48co4FnnFFHeFknOyzZC42A=='
|
|
||||||
FULL_USER_AGENT='user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36'
|
|
||||||
FULL_REFERER="referer: https://projects.intra.42.fr/projects/${PROJECT_NAME}/slots?team_id=${TEAM_ID}"
|
|
||||||
ITERS=100
|
ITERS=100
|
||||||
HEAD=5
|
HEAD=5
|
||||||
DELAY=3
|
DELAY=3
|
||||||
|
|
@ -20,24 +10,24 @@ for i in $(seq ${ITERS}); do
|
||||||
printf '\033[33m%s\033[m\n' "Iter: ${i} / ${ITERS}"
|
printf '\033[33m%s\033[m\n' "Iter: ${i} / ${ITERS}"
|
||||||
printf '\033[32m%s\033[m\n' "$(date)"
|
printf '\033[32m%s\033[m\n' "$(date)"
|
||||||
printf '\033[34m%s\033[m\n' "Next ${HEAD} Slots Open At:"
|
printf '\033[34m%s\033[m\n' "Next ${HEAD} Slots Open At:"
|
||||||
curl "${API}${PARAMETERS}" \
|
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 'authority: projects.intra.42.fr' \
|
||||||
-H 'accept: application/json, text/javascript, */*; q=0.01' \
|
-H 'accept: application/json, text/javascript, */*; q=0.01' \
|
||||||
-H 'accept-language: en-US,en;q=0.8' \
|
-H 'accept-language: en-US,en;q=0.6' \
|
||||||
-H 'cache-control: no-cache' \
|
-H 'cookie: user.id=MTQ3ODQ1--2ed4a01852220e3253f40a3457511a8ae91ca457; _intra_42_session_production=8974045809c7675897d87f107c8351d5' \
|
||||||
-H "${FULL_COOKIE}" \
|
-H 'if-none-match: W/"43b2f38b05d34ca320bad62295013cf5"' \
|
||||||
-H 'pragma: no-cache' \
|
-H 'referer: https://projects.intra.42.fr/projects/c-piscine-shell-01/slots?team_id=4776317' \
|
||||||
-H "${FULL_REFERER}" \
|
-H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Brave";v="110"' \
|
||||||
-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-mobile: ?0' \
|
-H 'sec-ch-ua-platform: "Linux"' \
|
||||||
-H 'sec-ch-ua-platform: "Linux"' \
|
-H 'sec-fetch-dest: empty' \
|
||||||
-H 'sec-fetch-dest: empty' \
|
-H 'sec-fetch-mode: cors' \
|
||||||
-H 'sec-fetch-mode: cors' \
|
-H 'sec-fetch-site: same-origin' \
|
||||||
-H 'sec-fetch-site: same-origin' \
|
-H 'sec-gpc: 1' \
|
||||||
-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 "${FULL_USER_AGENT}" \
|
-H 'x-csrf-token: PPqEuvdjwNwubP4y3JYC09t95FZLTRUOalFJ/GhYDsvvwVLTHxudjTpP2ixi2GndpqhzDlR7PIbLuaKNFaQ3RQ==' \
|
||||||
-H "${FULL_CSRF_TOKEN}" \
|
-H 'x-requested-with: XMLHttpRequest' \
|
||||||
-H 'x-requested-with: XMLHttpRequest' \
|
--compressed \
|
||||||
-s |
|
-s |
|
||||||
jq '.[].start' -r |
|
jq '.[].start' -r |
|
||||||
tr 'T' ' ' |
|
tr 'T' ' ' |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue