h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
| nnoremap yy "+yy | |
| vnoremap y "+y | |
| nnoremap p "+p | |
| vnoremap p "+p | |
| nnoremap P "+P | |
| vnoremap P "+P |
| # encoding: UTF-8 | |
| class GxApp | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| include Mongoid::Sequence | |
| store_in session: "gxservice" | |
| field :name, type: String, default: "Guanxi.me" | |
| field :version, type: String |
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:
In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.
Some examples:
7 # integer literalExample of Kamal deployment from Github Actions.
Add your applications .env variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions
https://github.com/username/repo_name/settings/secrets/actions
you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret
create action workflows