Skip to content

Instantly share code, notes, and snippets.

View lukeocodes's full-sized avatar
:shipit:
Just shipping

Luke Oliff lukeocodes

:shipit:
Just shipping
View GitHub Profile
@lukeocodes
lukeocodes / package.json
Last active July 21, 2024 10:20
Adding dev-https to your package file for local HTTPS development
{
"name": "web",
"version": "0.1.0",
"private": true,
"scripts": {
"dev-https": "cross-env NEXT_PUBLIC_APP_URL=yourdomain.com cross-var next dev . --hostname=$NEXT_PUBLIC_APP_URL --experimental-https",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
@lukeocodes
lukeocodes / clone.sh
Created August 10, 2023 10:11
Clone app repos for an org
curl -s https://api.github.com/orgs/lukeocodes/repos\?per_page\=100 | jq '.[].html_url' | xargs -n 1 git clone
@lukeocodes
lukeocodes / example.vtt
Created June 16, 2023 11:10
Example WebVTT file - Deepgram transcription of https://dpgr.am/spacewalk.wav
WEBVTT
NOTE
Transcription provided by Deepgram
Request Id: 3f3e86c6-c632-4dee-a54e-76871eb49bd2
Created: 2023-06-16T11:01:31.417Z
Duration: 25.933313
Channels: 1
01:00:00.000 --> 01:00:03.220
@lukeocodes
lukeocodes / example.srt
Last active July 21, 2023 15:45
Example SRT file - Deepgram transcription of https://dpgr.am/spacewalk.wav
1
01:00:00,000 --> 01:00:03,220
Yeah. As as much as it's worth celebrating
2
01:00:04,480 --> 01:00:05,940
the 1st spacewalk
3
01:00:06,399 --> 01:00:07,859
@lukeocodes
lukeocodes / Breadcrumbs.vue
Last active April 2, 2024 14:01
A breadcrumbs component for Nuxt3
<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
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)
<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
.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.
<?php
class QuickGit
{
/** @var int */
private $major = 1;
/** @var int */
private $minor = 0;