snowpack dev
- Bridgetown builds to
bridgetown/
- Snowpack builds that output + output of your frontend assets to
out/
- Runs with hot reloading on localhost:8080
- Build for production
BRIDGETOWN_ENV=production snowpack build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###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| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= 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 %> |
Starting on the feature branch:
git checkout main
git pull
git checkout -
git pull --rebase origin main
git push -f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
ruby -v 2>>&1 | tee -a ~/desktop/ruby_output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# PG | |
# Start with `switch_pg 13.6` for example | |
function pg_switch { | |
local version_to_run=$1 | |
local currently_running_version=$(psql --no-psqlrc -t -c 'show server_version;' postgres | xargs) | |
# check if you're erroneously switching to the same version | |
if [ "$version_to_run" = "$currently_running_version" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Obsidian CSS Snippets */ | |
/* ============================== | |
Frontmatter | |
============================== */ | |
.cm-hmd-frontmatter { | |
font-size: 10px !important; | |
} | |
/* ============================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path") | |
const fsLib = require("fs") | |
const fs = fsLib.promises | |
const { pathToFileURL, fileURLToPath } = require("url") | |
const glob = require("glob") | |
const postcss = require("postcss") | |
const postCssImport = require("postcss-import") | |
const readCache = require("read-cache") | |
// Detect if an NPM package is available |