Skip to content

Instantly share code, notes, and snippets.

View danurbanowicz's full-sized avatar

Dan Urbanowicz danurbanowicz

View GitHub Profile
@danurbanowicz
danurbanowicz / working-with-git.md
Last active July 3, 2024 06:16
Working with Git

Working with Git

A simple Git strategy for teams

TLDR

Use git branching. Branching is the fundamental point of git and what separates it from most other source control systems. The ease of branching and then picking or merging those branches is what makes git, git.

Protect main

@danurbanowicz
danurbanowicz / server.ts
Created January 12, 2023 16:54
Deno Oak Server Example
// A simple Deno Oak web server + router that parses a greeting from the URL
// and returns it as the response body
// Import the required modules
import { Application, Router } from "https://deno.land/x/oak/mod.ts";
// Create a new instance of the Oak router
const router = new Router();
// Define our greeting route e.g. /say/{greeting}
@danurbanowicz
danurbanowicz / netlify.toml
Created October 20, 2022 06:58
Sample netlify.toml File
[build]
# The build output folder
publish = "_site"
# The build command
command = "eleventy"
[build.environment]
# Environment variables are set here
NODE_VERSION = "16.18.0"
@danurbanowicz
danurbanowicz / .nvmrc
Created October 20, 2022 06:34
Sample .nvmrc File
16.18.0
@danurbanowicz
danurbanowicz / eleventy.js
Last active October 19, 2022 09:55
Eleventy Quick Tip: Filter a Collection by Custom Frontmatter
const lodash = require("lodash");
module.exports = function(eleventyConfig) {
eleventyConfig.addFilter("include", (arr, path, value) => {
value = lodash.deburr(value).toLowerCase();
return arr.filter((item) => {
let pathValue = lodash.get(item, path);
@danurbanowicz
danurbanowicz / nightly-deploy.yml
Created March 27, 2022 15:11
Trigger a Netlify deploy each night
name: Deploy
on:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest