gcloud auth login # Authenticate
gcloud config set project [PROJECT_ID] # Set default projectStarting with Puma 6.0, the --daemon flag has been removed for security reasons. Puma no longer supports daemonizing itself directly. If you need to run Puma in the background as a service, you should use a process manager like systemd, Upstart, or foreman, instead of using --daemon.
Instead of using Puma’s built-in daemon mode, you can manage it with a process manager like systemd. Here’s an example of how you can set up Puma with systemd:
Create a file called /etc/systemd/system/puma.service with the following content (replace paths with your specific setup):
[Unit]
WYSIWYG editor for website is summernote https://summernote.org
Summernote setup with webapcker, using yarn add command
yarn add [email protected]
| brew update | |
| brew upgrade | |
| rbenv install -l | |
| # will list all latest ruby versions | |
| # if it will not show all latest versions | |
| # then run: | |
| cd ~/.rbenv/plugins/ruby-build/ && git pull | |
| # list all versions again |
This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml
Myrails::Application.routes.draw do| #!/bin/bash | |
| # This config file is for desktop version of Ubuntu | |
| # Default settings | |
| start=`date +%s` | |
| bold=$(tput bold) | |
| normal=$(tput sgr0) | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` |
| #!/bin/bash | |
| # Default settings | |
| start=`date +%s` | |
| bold=$(tput bold) | |
| normal=$(tput sgr0) | |
| red=`tput setaf 1` | |
| green=`tput setaf 2` | |
| reset=`tput sgr0` | |
| VIMREPO="https://gist.github.com/frizbee/8174f50d6863666efb217615bc1ecfac/raw/42db6ec0527de01e1215ca29689ea7ef10b7d51d/vimrc" |
| sudo apt-get update | |
| sudo apt-get install libjemalloc-dev | |
| RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.7.1 | |
| rbenv global 2.7.1 | |
| # test (look for jemalloc warnings) | |
| MALLOC_CONF=invalid_flag:foo ruby -v | |
| # check | |
| ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']" |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |