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| class ApplicationController < ActionController::Base | |
| private | |
| # Runs a rake task asyncronously in a child process | |
| # | |
| # for example, in any controller: | |
| # async_rake("async:import_fixtures") | |
| # async_rake("db:maintenance:cleanup", table: "things", ids: [12, 114, 539]) | |
| # |
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| <!-- Modified from https://gist.github.com/NicholasKimuli/2b167ca1c6ce03cb860e3f89d17db1eb | |
| Bonaire, Saba and Sint Eustatius may need a future flag update --> | |
| <select class="input-block-level" id="countryCode" name="countryCode"> | |
| <option data-countryCode="AF" value="93">🇦🇫 Afghanistan (+93)</option> | |
| <option data-countryCode="AL" value="355">🇦🇽 Albania (+355)</option> | |
| <option data-countryCode="DZ" value="213">🇩🇿 Algeria (+213)</option> | |
| <option data-countryCode="AD" value="376">🇦🇩 Andorra (+376)</option> | |
| <option data-countryCode="AO" value="244">🇦🇴 Angola (+244)</option> | |
| <option data-countryCode="AI" value="1264">🇦🇮 Anguilla (+1264)</option> | |
| <option data-countryCode="AG" value="1268">🇦🇬 Antigua & Barbuda (+1268)</option> |
| source "https://rubygems.org" | |
| gem "progressbar" |
| puts "Start: This is amazing" | |
| puts "testing-embed-with-js.rb" | |
| puts "End: This is amazing" |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| <!-- start Gist JS code--> | |
| <script> | |
| (function(){ | |
| var loadEvent = 'turbolinks:load'; | |
| var unloadEvent = 'turbolinks:before-visit'; | |
| var loadHandler = function() { | |
| document.removeEventListener(loadEvent, loadHandler); | |
| document.addEventListener(unloadEvent, unloadHandler); | |
| setTimeout(function () { | |
| // Replace WORKSPACE_ID text with your Workspace ID |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)All code is available in example app - https://github.com/maxivak/webpacker-rails-example-app