Skip to content

Instantly share code, notes, and snippets.

View trevor-coleman's full-sized avatar

Trevor Coleman trevor-coleman

View GitHub Profile
@trevor-coleman
trevor-coleman / commit-reverser.ts
Created May 6, 2023 14:45
Commit Reverser - Reverses Git Commits
#!/bin/bash
# to run: ./commit-reverser <first_commit>
# - creates a new branch, based on the parent of the provided commit, with the commits from HEAD
# to first-commit applied in reverse order
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <first_commit>"
@trevor-coleman
trevor-coleman / command-menu.sh
Last active May 4, 2023 15:56
Command Chooser
#!/bin/bash
# This script reads a list of descriptions and commands from a YAML-like input file and presents the options to the user.
# Each option has a description and an associated command.
# The input file format should be as follows:
#
# - description: "Description 1"
# command: "command1"
# - description: "Description 2"
# command: "command2"
@trevor-coleman
trevor-coleman / cargo build
Created November 27, 2021 04:36
Cargo Build Error
project is  v0.1.0 via  v1.58.0-nightly on  us-east-2 took 4s
11:34pm ❯ cat log.txt
Compiling bevy_dylib v0.5.0
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-Wl,-exported_symbols_list,/var/folders/15/8kdrj69n3zq37v2tcm698jc80000gn/T/rustcoGz6A0/list" "-m64" "-arch" "x86_64" "/Users/trevorcoleman/rust/trevor/target/debug/deps/bevy_dylib-2f0a85c796af83d6.bevy_dylib.59a3f046-cgu.0.rcgu.o" "/Users/trevorcoleman/rust/trevor/target/debug/deps/bevy_dylib-2f0a85c796af83d6.14fy4siuuxfi8nnb.rcgu.o" "-L" "/Users/trevorcoleman/rust/trevor/target/debug/deps" "-L" "/Users/trevorcoleman/rust/trevor/target/debug/build/minimp3-sys-6adc0f9c8b9cd525/out" "-L" "/Users/trevorcoleman/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy-glsl-to-spirv-0.2.1/build/osx" "-L" "/Users/trevorcoleman/rust/trevor/target/debug/build/spirv-reflect-8fe78f938d5444e1/out" "-L" "/Users/trevorcoleman/rust/trevor/target/debug/build/objc_exception-7c5fd47d671f0a79/out" "-L" "/Users/trevorcoleman/rust/trevor/target/debug
@trevor-coleman
trevor-coleman / commit-scopes.js
Last active September 7, 2021 00:14
A script to add subdirectories as scopes to commitlint scope-enum.
const fs = require('fs');
/**
* scopePaths defines which paths will have their subdirectories added to the list of scopes.
*
* The top level path (src) is not included.
*
* So with the directory structure:
* .
* └── src
@trevor-coleman
trevor-coleman / geo-json.ts
Created November 10, 2020 15:36 — forked from codediodeio/geo-json.ts
A Typescript interface for GeoJSON objects based on rfc7946
export interface IGeometry {
type: string;
coordinates: number[];
}
export interface IGeoJson {
type: string;
geometry: IGeometry;
bbox?: number[];
properties?: any;
@trevor-coleman
trevor-coleman / app.coffee
Created December 3, 2016 21:06
The magic
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info
Framer.Info =
title: "Flow Controller Regex"
author: "Trevor Coleman"
twitter: "@trevorcoleman"
description: "Experimenting with new Flow Controller, using regEx to programmatically assign event listeners by layer name"