Skip to content

Instantly share code, notes, and snippets.

@keiranlovett
keiranlovett / batchUpdateExifGeo.sh
Created November 12, 2023 22:43
./batchUpdateExifGeo.sh /path/to/directory latitude longitude elevation latRef longRef
#!/bin/zsh
# Check if ExifTool is installed
if ! command -v exiftool &> /dev/null; then
echo "Error: ExifTool is not installed. Please install it before running this script."
echo "You can install it using Homebrew: brew install exiftool"
exit 1
fi
# Check if the user provided a directory and GPS coordinates as arguments
@keiranlovett
keiranlovett / beautiful.rest.api.docs.in.markdown.md
Created June 26, 2023 17:58 — forked from azagniotov/beautiful.rest.api.docs.in.markdown.md
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@keiranlovett
keiranlovett / USDZ Sample 1
Created October 17, 2018 16:06 — forked from ksurendra/USDZ Sample 1
Universal Scene Description Zip - USDZ Sample Files
@keiranlovett
keiranlovett / script.js
Last active January 5, 2021 21:05
Facebook Camera Effects - Toggle various elements on tap.
/* ----------- API ------------- *\
// Available modules include (this is not a complete list):
var Scene = require('Scene');
var Textures = require('Textures');
var Materials = require('Materials');
var FaceTracking = require('FaceTracking');
var Animation = require('Animation');
var Reactive = require('Reactive');
// Example script
@keiranlovett
keiranlovett / SelfIllumAlpha.shader
Created June 23, 2017 02:15
unity: SelfIllumAlpha
Shader "SelfIllumAlpha" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Texture", 2D) = "white" { }
}
SubShader {
Tags { "Queue" = "Transparent" }
Pass {
@keiranlovett
keiranlovett / Logger.cs
Created June 22, 2017 02:48
unity: Debug Logger
using UnityEngine;
/// <summary>
/// A logger that wraps Unity's internal logger.
/// Calls to its methods are stripped in case the LOGGER_SYMBOL is not defined.
/// </summary>
public sealed class Logger
{
public const string LOGGER_SYMBOL = "ENABLE_LOG";
using UnityEngine;
using System.Collections;
// Use for providing that initial oomph, like a cannonball launch, thrown rock or
// paper airplane. Contrast with the built-in ConstantForce, which applies force
// each update and would be more suitable for a self-powered rigidbody like a
// missile, ship, or simulation of gravity. -- The author
[RequireComponent (typeof(Rigidbody))]
@keiranlovett
keiranlovett / Tunneling.cs
Created June 19, 2017 07:40
Unity VR Tunneling
using UnityEngine;
using System.Collections;
public class Tunneling : MonoBehaviour {
#region Public Fields
[Header("Angular Velocity")]
/// <summary>
/// Angular velocity calculated for this Transform. DO NOT USE HMD!
/// </summary>
@keiranlovett
keiranlovett / ScriptKeywordProcessor.cs
Last active June 19, 2017 07:38
Unity Script Template
using UnityEngine;
using UnityEditor;
internal sealed class ScriptKeywordProcessor : UnityEditor.AssetModificationProcessor {
// This script currently contains 4 keywords, feel free to add more
// #CREATIONDATE#
// #PROJECTSNAME#
// #DEVELOPERNAME#
// #COMPANY#
@keiranlovett
keiranlovett / ActorUtililty.cs
Last active August 8, 2017 00:29
Unity Utilities
using System.Collections.Generic;
using UnityEngine;
namespace UnityCommonLibrary.Utility
{
public static class ActorUtililty
{
/// <summary>
/// Caching because Actors should never be removed
/// </summary>