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
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" |
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 postgres
Some 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
<template> | |
<div> | |
<vue-editor v-model="content" ref="editor" :editor-options="toolbarOptions" @text-change="updateValue" useCustomImageHandler @imageAdded="uploadImage"></vue-editor> | |
</div> | |
</template> | |
<script> | |
import Vue from "vue"; | |
import axios from 'axios' | |
let VueEditor, Quill; |
require 'pathname' | |
require 'open3' | |
require 'mini_magick' | |
SRC_DIR = '/path/to/src/dir/'.freeze | |
TMP_DIR = '/path/to/tmp/dir/'.freeze | |
class TextReader | |
def initialize(input_path, output_path) | |
@input_path = input_path |