Skip to content

Instantly share code, notes, and snippets.

View moeamaya's full-sized avatar
👋

Moe Amaya moeamaya

👋
View GitHub Profile
class Organization < ApplicationRecord
has_one :subscription
end
class Subscription < ApplicationRecord
has_many :payments
# stripe_id
# plan_id
# last_four
@moeamaya
moeamaya / data.json
Last active November 13, 2017 16:22
{
"project_type": "Prospect",
"project": "2013120B",
"start_date": "2017-11-13",
"duration": 24,
"fee_construction": 25000000,
"fee_percent": 6,
"fee_total": 1580000,
"budget_pm_percentage": 9,
"budget_reserve": 10,
// Note this is against Twitter's Terms of Service, so it's just for fun :)
const btns = Array.from(document.querySelectorAll('[data-testid]'))
const unfollows = btns.filter(btn => btn.textContent == "Following")
for (let i = 0; i <= unfollows.length; i++){
setTimeout(function () {
unfollows[i].click();
setTimeout(function () {
const confirm = document.querySelector('[data-testid="confirmationSheetConfirm"]');
@moeamaya
moeamaya / fontFace.js
Created June 17, 2020 14:54
Loop through FontFace on a webpage
document.fonts.ready.then((fonts) => {
const fontFaces = Array.from(fonts);
console.log(fontFaces);
});

Building a Design System Documentation Site with Astro

This guide outlines how we at Operate set up an Astro-powered documentation site for our design system, with automatic content sourcing from your component library package. The project is led by Joe Bell.

Overview

This setup automatically generates documentation pages from markdown files located within your design system package (e.g., @org/pipeline). It uses Astro's content collections with the glob loader to source .md and .mdx files directly from node_modules.

Key Features