YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
# Use a prefix for the index names that Tire uses so that the test suite doesn't | |
# stomp on dev data and you can work on multiple apps with ES, but keep tidy | |
# unadorned names for production. | |
unless Rails.env.production? | |
Tire::Model::Search.index_prefix("#{Rails.application.class.parent_name.downcase}_#{Rails.env}") | |
end |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Railscasts Extended/Railscasts Extended.tmTheme", | |
"draw_white_space": "selection", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
"...", |
I hereby claim:
To claim this, I am signing this object:
Let’s see how to use PostgreSQL to import and export CSV files painlessly with the COPY
command.
Import CSV into table t_words
:
COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;
You can tell quote char with QUOTE
and change delimiter with DELIMITER
.
class Rabbitmq < Formula | |
desc "Messaging broker" | |
homepage "https://www.rabbitmq.com" | |
url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.16/rabbitmq-server-generic-unix-3.7.16.tar.xz" | |
sha256 "a34011f8ff1682a1601d4b8e0167ad39b91fd8f0fb35b484c41efde9f104ed08" | |
bottle :unneeded | |
depends_on "erlang" |
%Plug.Conn{ | |
adapter: {Plug.Adapters.Cowboy.Conn, :...}, | |
assigns: %{ | |
my_assigns: "here" | |
}, | |
before_send: [ | |
#Function<7.125546534/1 in Phoenix.Controller.fetch_flash/2>, | |
#Function<1.127904613/1 in Plug.Session.before_send/2>, | |
#Function<1.43511252/1 in Plug.Logger.call/2>, | |
#Function<0.70322810/1 in Phoenix.LiveReloader.before_send_inject_reloader/1> |
This is a test |
# I submitted a bug report https://github.com/rails/rails/issues/34244 | |
# b/c Rails was not honouring my `rescue_from` block which was causing my API to | |
# be inconsistent. I was told this is expected behaviour. I think it's probably | |
# fine for an HTML app where you control the form inputs. But for an API app, | |
# the API is public facing and very important, so Rails shouldn't have its own | |
# special errors that bypass my app's configuration and make my API inconsistent. | |
# | |
# Decided it shouldn't be too difficult to handle this myself. So, here is my | |
# solution. It contains most of the important lessons I've learned about how to | |
# get a Rails API app setup. It removes Rails' params parsing and adds its own. |