Skip to content

Instantly share code, notes, and snippets.

View foxleigh81's full-sized avatar
:octocat:
Looking for work!

Alexander Foxleigh foxleigh81

:octocat:
Looking for work!
View GitHub Profile
@foxleigh81
foxleigh81 / side-panel.plan.md
Created June 22, 2025 21:12
Example Planfile

Side Panel Development Plan

Overview

We are building out feature-specific side panels for the map sidebar functionality. These panels will display detailed information when users click on different types of features on the map.

Prerequisites

As always, before you begin working on the plan, read through the docs in /docs and check your .cursorrules file to ensure you are coding in accordance with our project standards

You are a junior developer, working alongside me, an experiened, senior developer.
You are assisting me with creating my next.js and sanity.io based blog project.
These are the critical project rules you must follow in all suggestions, code generations, and refactors:
- TypeScript strict mode is enabled. Never use `any`, never leave unused code.
- React functional components only, using hooks.
- All data is stored in Sanity CMS
- The blog is a statically generated site so client side code should be used sparingly
- Minimise component-level local state (use only for isolated UI behaviour).
- Document everything: functions, components, props, types, interfaces.
@foxleigh81
foxleigh81 / vmd
Last active October 24, 2019 10:29
DISABLE_AUTO_TITLE="true"
# Commonly used commands for VMD
vmd() {
# don't forget to set this variable to your vmd folder
vmdDir=~/Dev/vmd
# The variable below assumes you're on a .1. subnet, you'll need to change this
# if you are not, otherwise, leave it alone.
ip=$(ifconfig -a | awk '$1 == "inet" {print $2}' | grep 192.168.1.)
# No arguments passed, just go to vmd folder
@foxleigh81
foxleigh81 / wrap.js
Last active January 14, 2019 22:22
Wrap - takes a filename and wraps a directory with the same name (minus extension) around it and renames the file to index.md
#!/usr/bin/env node
// takes a filename and wraps a directory with the same name (minus extension) around it and renames the file to whatever you like
// all output is placed in a directory called 'output' in the directory the script is run in.
var fs = require('fs')
var path = require('path')
const searchRecursive = (dir, pattern) => {
// This is where we store pattern matches of all files inside the directory
@foxleigh81
foxleigh81 / up
Last active December 14, 2018 14:37
Bash script to go up x directories
up() {
if [[ $@ == 1 ]]; then
# Go up one folder (cd ..)
cd ..
elif [[ $@ == 2 ]]; then
# Go up two folders (cd ../..)
cd ../..
elif [[ $@ == 3 ]]; then
# Go up three folders (cd ../../..)
cd ../../..
@foxleigh81
foxleigh81 / unwrap
Last active December 13, 2018 20:20
unwrap bash alias
# Copies the contents of the current directory into the parent
# directory and then deletes the current directory
unwrap() {
THISDIR=`basename $PWD`
if [ -z "$(ls -A)" ]; then
echo "No files to unwrap."
else
cp -r * ../
fi
echo "Removing directory"
@foxleigh81
foxleigh81 / pr-template
Last active July 11, 2025 14:27
A template for a good PR
# Pull Request
## 🧰 Ticket
[The ticket the work was done for]
## 🚀 Overview
[A summary of what you did in no more than one paragraph]
@foxleigh81
foxleigh81 / clarity.yml
Last active August 22, 2017 10:25
clarity.json config file
# Author needs to be specified in order to generate accurate documentation
author :
name: "Alex Foxleigh"
giturl : "https://github.com/foxleigh81"
defaults:
# viewType will specify the file extension used for views. Any extension can be used here (ommit the '.'')
viewType : "njk"
# viewType will specify the preprocessor used for styles. At the moment only Stylus (.styl) is supported
styleType: "stylus"
@foxleigh81
foxleigh81 / linktextemmet
Created April 23, 2015 15:53
Emmet snippet for wrapping link text (Really useful for wrapping lots of links quickly)
a[href="http://www.$#"]{$#}
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Example aliases