Skip to content

Instantly share code, notes, and snippets.

Avatar
🥑

Luke Oliff lukeocodes

🥑
View GitHub Profile
@lukeocodes
lukeocodes / Breadcrumbs.vue
Last active March 17, 2023 06:25
A breadcrumbs component for Nuxt3
View Breadcrumbs.vue
<script lang="ts" setup>
const route = useRoute();
const router = useRouter();
const getBreadcrumbs = () => {
const fullPath = route.path;
const requestPath = fullPath.startsWith("/")
? fullPath.substring(1)
: fullPath;
const crumbs = requestPath.split("/");
@lukeocodes
lukeocodes / gh-issueBranch.alias
Last active June 4, 2022 10:54
Github CLI alias to create a branch from GitHub Issue
View gh-issueBranch.alias
gh alias set issueBranch --shell \
'title="$(gh issue view $1 --json title --jq .title)"; \
slug="$(source $HOME/.zshrc && slugify "$title")"; \
git checkout -b "prefix-$1.$slug"'
@lukeocodes
lukeocodes / Breadcrumbs.vue
Last active July 14, 2022 21:02
Semantic breadcrumbs based on the Nuxt Router (vue-router)
View Breadcrumbs.vue
<template>
<ol
vocab="http://schema.org/"
typeof="BreadcrumbList"
>
<li property="itemListElement" typeof="ListItem">
<NLink property="item" typeof="WebPage" to="/">
<span property="name">Vonage Learn</span>
</NLink>
<meta property="position" content="1" />
@lukeocodes
lukeocodes / Pride.css
Last active November 1, 2020 09:47
LGBT symbols in CSS
View Pride.css
.Pride {
background: linear-gradient(
#000000,
#000000 12.5%,
#754d15 12.5%,
#754d15 25%,
#f00000 25%,
#f00000 37.5%,
#ff8000 37.5%,
#ff8000 50%,
@lukeocodes
lukeocodes / QuickGit.php
Last active December 11, 2018 08:06
Current git version.
View QuickGit.php
<?php
class QuickGit
{
/** @var int */
private $major = 1;
/** @var int */
private $minor = 0;