sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
There are trhee diffrent time zones in rails
UTC, but do not change itconfig.time_zone should be set when an app dose not support multiple time zones| mkdir ~/pg_backup/ | |
| sudo -u postgres pg_dump test > pg_dump | |
| tar -cvf ~/pg_dump.tar ~/pg_dump | |
| rm -rf ~/pg_dump | |
| #https://github.com/andreafabrizi/Dropbox-Uploader | |
| ~/dropbox_uploader.sh upload ~/pg_dump.tar /pg_dump.tar | |
| rm ~/pg_dump.tar |
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using: