scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
So you're running a Rails application and want to spruce up your YARD documentation. Here's the guide I wish I had.
Add yard-activerecord
and yard-activesupport-concern
to your Gemfile, add --plugin activerecord
and --plugin activesupport-concern
to your .yardopts
flags, and db/schema.rb
to the end of your .yardopts
sources. Your models' attributes and assocations should now be included in the documentation.
To modify your YARD template, create doc-src/templates/default/fulldoc/html
, then add --template-path doc-src/templates
to your project's .yardopts
. You can now create a doc-src/templates/default/fulldoc/html/css/common.css
and the styles will be included (but overwrites need to be !important
).
# Guitar Tabs Template | |
# Created by: Ultimate Guitar | |
# Source URL: https://www.ultimate-guitar.com/lessons/for_beginners/guitar_tabs_template.html | |
----------------------------------------------------------------- | |
SONG NAME - Band Name | |
----------------------------------------------------------------- | |
Tabbed by: | |
Email: |
{ | |
"name": "Sample Dark Theme", | |
"background": "#000000", | |
"backgroundLight": "#9b9b9b", | |
"backgroundNeutral": "#535353", | |
"foreground": "#ffffff", | |
"foregroundNeutralSecondary": "#ffffff", | |
"foregroundNeutralTertiary": "#ffffff", | |
"tableAccent": "#0c62fb", | |
"dataColors": [ |
Twitter has released the official API v2 endpoint for the bookmark feature. https://twittercommunity.com/t/build-with-bookmarks-on-the-twitter-api-v2/168804/
The following descriptions are or will soon be no longer useful; I suggest using the new official API.
# The following comments fill some of the gaps in Solargraph's understanding of | |
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but | |
# ignored at runtime. | |
# | |
# You can put this file anywhere in the project, as long as it gets included in | |
# the workspace maps. It's recommended that you keep it in a standalone file | |
# instead of pasting it into an existing one. | |
# | |
# @!parse | |
# class ActionController::Base |
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
# Benefits of: https://gist.github.com/e12e/e0c7d2cc1d30d18c8050b309a43450ac | |
# And fixes of: https://gist.github.com/joelvh/f50b8462611573cf9015e17d491a8a92 | |
namespace :db do | |
desc 'Dumps the database to backups' | |
task dump: :environment do | |
dump_fmt = ensure_format(ENV['format']) | |
dump_sfx = suffix_for_format(dump_fmt) | |
backup_dir = backup_directory(Rails.env, create: true) |
# frozen_string_literal: true | |
require 'dotenv' | |
require 'net/http' | |
require 'json' | |
module Codewars | |
Dotenv.load('.env') | |
ENDPOINT = 'https://www.codewars.com/api/v1/' | |
API_KEY = ENV['CW_API_KEY'] |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Example", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "node", | |
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], |
// npm install --save scrollreveal or install like you're used to doing it. | |
// It doesn't work well if there are multiple instances of ScrollReveal, | |
// so we have to create a module returning an instance: | |
// file ScrollReveal.js: | |
import ScrollReveal from 'scrollreveal' | |
export default ScrollReveal() | |
// Then in a component: | |
import React from 'react' | |
import sr from './ScrollReveal' |