jqn -r markdown-table 'map(x => "## " + x.name + "\n\n" + markdownTable(x.columns.map(y => [y.name, y.type])) ) | join("\n\n")' < /tmp/stripe.json
id | varchar |
---|---|
business_name | varchar |
business_url | varchar |
# /spec/support/documentation/after_rspec_example.rb | |
# Normally, we'd want to break into multiple files, but then it becomes more to install (unless gemified) | |
module SomeApp | |
module Documentation | |
class AfterRspecExample | |
def self.apply!(context, example, response) | |
SwaggerExample::Request.apply!(context, example, response) | |
SwaggerExample::Response.apply!(context, example, response) | |
end |
// Execution of certain function in an ISR context is not safe. | |
// For example, printf() in an interrupt context causes a Mutex error. | |
// Using Mbed's EventQueue, you can defer execution of code from an interrupt context to a user context. | |
// More about EventQueue: https://os.mbed.com/docs/mbed-os/v5.15/tutorials/the-eventqueue-api.html | |
#include "mbed.h" | |
EventQueue *queue = mbed_event_queue(); // event queue | |
RawSerial pc(USBTX, USBRX); |
# Define the validator | |
# app/validators/array_validator.rb | |
class ArrayValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, values) | |
Array(values).each do |value| | |
options.each do |key, args| | |
validator_options = { attributes: attribute } | |
validator_options.merge!(args) if args.is_a?(Hash) |
import { Controller } from "stimulus" | |
import { DirectUpload } from "@rails/activestorage" | |
import Dropzone from "dropzone" | |
import { getMetaValue, findElement, removeElement, insertAfter } from "helpers" | |
Dropzone.autoDiscover = false | |
export default class extends Controller { | |
static targets = [ "input" ] |
Pre-installation from live OS
This setup of Ubuntu with LUKS and LVM is tested on Ubuntu 18.04.
Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/nvme0n1.
<template lang='pug'> | |
div.drop-zone(:class='{dragging: isDragging }' | |
@dragover.prevent='dragover' | |
@dragenter.prevent='dragover' | |
@drop.prevent.stop='onDrop' | |
@dragleave.prevent='dragleave') | |
div(:class='{ hidden: uploadInProgress }' @click='openFileBrowser') | |
slot | |
i {{label}} | |
input(type='file' :multiple='multiple' ref='input' style='display: none') |
https://github.com/ankane/searchkick
By default, simply adding the call 'searchkick' to a model will do an unclever indexing of all fields (but not has_many or belongs_to attributes).
In practice, you'll need to customize what gets indexed. This is done by defining a method on your model called search_data
def search_data
Serial Keys: | |
YV54A-2ZW5P-M887Y-UWXNE-QPUXD | |
VY3R2-0NW0L-H845Q-TDMXT-XQAT0 | |
VC7JR-A0Z97-08EGZ-M4YNV-XVHD0 | |
FC1TU-4RGEQ-084EP-2XQQX-ZGHWA | |
CU1WA-8HGEN-M815Z-HQP5E-QKADF | |
AY7D0-FTG44-H846Y-2XPGV-P32T8 | |
If i request you to be my mentor, what will you teach? comment below. |