Skip to content

Instantly share code, notes, and snippets.

View andrewmcodes's full-sized avatar
🎙️
Recording Remote Ruby

Andrew Mason andrewmcodes

🎙️
Recording Remote Ruby
View GitHub Profile
@andrewmcodes
andrewmcodes / 10x.erb
Last active August 4, 2021 17:05
html is so 2008
<%= render ArticleComponent.new do %>
<%= render StackComponent.new do %>
<%= render BoxComponent.new(as: :header) do %>
<%= render HeaderComponent.new.with_content(resource.data.title) %>
<%= render TextComponent.new(tone: :secondary) do %>
<%= render LinkComponent.new(href: "/").with_content("Andrew Mason") %>
• <%= pretty_date resource.data.updated_at %>
• <%= reading_time resource.content %> Minute Read
<% end %>
<% end %>
@andrewmcodes
andrewmcodes / WORKFLOW.md
Last active July 6, 2021 13:55
Snowpack + Bridgetown + Tailwind + Vercel
  1. snowpack dev
  2. Bridgetown builds to bridgetown/
  3. Snowpack builds that output + output of your frontend assets to out/
  4. Runs with hot reloading on localhost:8080
  5. Build for production BRIDGETOWN_ENV=production snowpack build
@andrewmcodes
andrewmcodes / blog.rb
Created June 25, 2021 15:59
Bridgetown 0.21 Ruby Page
###ruby
front_matter do
layout :default
title "Blog"
description "A collection of my posts, tutorials, and thoughts that I've shared publicly"
permalink "/blog/"
end
###
render PostsComponent.new do |c|
@andrewmcodes
andrewmcodes / launch.json
Created June 23, 2021 05:35
vscode-launch-example
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Application",
"type": "chrome",
"preLaunchTask": "Start Dev",
"postDebugTask": "Terminate All Tasks",
"request": "launch",
"url": "http://localhost:8081",
@andrewmcodes
andrewmcodes / babel.config.json
Last active June 23, 2021 03:32
Snowpack Babel Config
{
"presets": [
[
"@babel/preset-env",
{
"shippedProposals": true,
"bugfixes": true,
"targets": {
"esmodules": true
}
@andrewmcodes
andrewmcodes / yarn_licences_md_table.sh
Created June 16, 2021 20:20 — forked from huntie/yarn_licences_md_table.sh
Script to generate a Markdown table from `yarn licenses list`
#!/bin/sh
# Output a dependencies.md file with a table of installed Yarn dependencies
# Requires csvkit, jq
# https://csvkit.readthedocs.io/en/0.9.1/install.html
# https://stedolan.github.io/jq/download/
yarn licenses list --json \
| jq --slurp 'map(select(.type == "table"))' \
@andrewmcodes
andrewmcodes / base_component.rb
Last active June 11, 2021 23:54
Simple Bridgetown ViewComponent Example
# src/_components/base_component.rb
class BaseComponent < ViewComponent::Base
include Bridgetown::ViewComponentHelpers
TWITTER_PROFILE_URL = "https://twitter.com/andrewmcodes"
def twitter_link
link_to "Twitter", TWITTER_PROFILE_URL
end
@andrewmcodes
andrewmcodes / iOS Shortcuts Catalog.md
Created June 11, 2021 21:47 — forked from brucebentley/iOS Shortcuts Catalog.md
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@andrewmcodes
andrewmcodes / test.md
Created June 11, 2021 00:32
A gist used for testing

Test

This is a gist used for testing.

@andrewmcodes
andrewmcodes / keybase.md
Created April 15, 2021 20:40
Keybase Proof

Keybase proof

I hereby claim:

  • I am andrewmcodes on github.
  • I am andrewmcodes (https://keybase.io/andrewmcodes) on keybase.
  • I have a public key ASCEud8pW7OPG801GlSPyEfSmnu50PLMXTBKxUURu62qbgo

To claim this, I am signing this object: