start new:
tmux
start new with session name:
tmux new -s myname
module Spree | |
Spree::Product.class_eval do | |
def self.getprods(params) | |
#get taxon_id from permalink | |
taxonid = params[:id].blank? ? nil : Taxon.find_by_permalink!(params[:id]).id | |
#keywords for paging | |
keywords = params[:keywords] | |
per_page = params[:per_page].to_i | |
per_page = per_page > 0 ? per_page : Spree::Config[:products_per_page] |
Very short description of the application.
Applicatoin is written in ruby language, using Ruby on Rails web framework.
If you're running a Rails app in Google App Engine's flexible environment, it takes a bit of setup to get to a rails console attached to your deployed environment. I wanted to document the steps for my own reference and also as an aid to others.
Open the Google App Engine -> instances section of the Google Cloud Platform (GCP) console.
Select the "SSH" drop-down for a running instance. (Which instance? Both of my instances are in the same cluster, and both are running Rails, so it didn't matter for me. YMMV.) You have a choice about how to connect via ssh.
Choose "Open in browser window" to open a web-based SSH session, which is convenient but potentially awkward.
Choose "View gcloud
command" to view and copy a gcloud
command that you can use from a terminal, which lets you use your favorite terminal app but may require the extra steps of installing the gcloud
command and authenticating the gcloud
command with GCP.
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC: