Skip to content

Instantly share code, notes, and snippets.

View muhajirinlpu's full-sized avatar
🎯
Focusing

Muhajirin Ilyas muhajirinlpu

🎯
Focusing
View GitHub Profile
@muhajirinlpu
muhajirinlpu / login.sh
Created September 27, 2023 05:13
pens autologin
#!/bin/bash
curl -s https://iac4.pens.ac.id:8009/index.php?zone=misc | grep "value=\"Disconnect\"" 1> /dev/null 2> /dev/null
if [ $? -ne 0 ] ; then
echo `date` "Internet not accessible. Logging into CAS..."
curl -s 'https://iac4.pens.ac.id:8009/index.php?zone=misc' -H 'Content-Type: application/x-www-form-urlencoded' -H 'DNT: 1' -H 'Origin: https://iac4.pens.ac.id:8009' -H 'Referer: https://iac4.pens.ac.id:8009/index.php?zone=misc' -H 'Upgrade-Insecure-Requests: 1' --data-raw 'auth_user=changeme%40is.student.pens.ac.id&auth_pass=changeme&redirurl=&accept=Login' --compressed > /dev/null
else
echo `date` "Internet accessible"
fi
@muhajirinlpu
muhajirinlpu / .env
Last active July 31, 2024 13:14
hoppscotch server docker compose
#-----------------------Backend Config------------------------------#
# Prisma Config
DATABASE_URL=postgresql://postgres:********@db:5432/hoppscotch
# Auth Tokens Config
JWT_SECRET="secret1233"
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY= 3
REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms
ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms