Skip to content

Instantly share code, notes, and snippets.

View Bradshaw's full-sized avatar
🚀
Lost in space

Gaeel Bradshaw-Rodriguez Bradshaw

🚀
Lost in space
View GitHub Profile
@Bradshaw
Bradshaw / TweenUtils.cs
Created August 6, 2018 15:26
Start of a tween system
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public delegate float TweenFunc(float t);
public static class TweenUtils {
@Bradshaw
Bradshaw / GetMainTextureThing.cs
Last active August 30, 2022 14:33
Example of detection of terrain texture at position
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetMainTextureThing : MonoBehaviour
{
TerrainData mTerrainData;
int alphamapWidth;
int alphamapHeight;
@Bradshaw
Bradshaw / YoinkPL.md
Last active May 5, 2022 00:01
Yoink Public License

Yoink Public License 2.0.0

All software in this project under YoinkPL 2.0.0 unless otherwise noted.

YoinkPL allows any person (with exceptions listed below) who has been able to gain access to the software to obtain complete authorisation to use, copy, modify and distribute the software, as long as the word "Yoink!" is pronounced before doing so.

The following license shall not be granted to the following entities or any subsidiary thereof due to their collaboration with US Immigration and Customs Enforcement ("ICE"):

  • "Microsoft Corporation"
@Bradshaw
Bradshaw / prepare-commit-msg
Last active January 20, 2022 14:16 — forked from jatubio/prepare-commit-msg
prepare-commit-msg git hook to add branch name to commit message
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, put this inside `.git/hooks/prepare-commit-msg`
@Bradshaw
Bradshaw / blast.c
Created November 7, 2015 00:06
A soundtrack for a jam game, written in C
#define true 1
#define false 0
#ifndef SPEED
#define SPEED 2
#endif
#ifndef CYCLEMODE
#define CYCLEMODE CONCERT
#endif
#ifndef SEQ
#define SEQ 0
int d = 10;
int led = 13;
int t = 0;
unsigned long lastMicros;
unsigned long deltaMicros;
double timeStep;
double timeUntil;
@Bradshaw
Bradshaw / how-to-notarize-unity-for-macos.md
Created September 6, 2021 07:44 — forked from dpid/how-to-notarize-unity-for-macos.md
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
@Bradshaw
Bradshaw / _README.md
Last active September 2, 2021 10:05
A cute iTerm2 config 🌸

It looks like this

My terminal prompt in all its glory

  1. Includes Git branch name
  2. Distance (ahead & behind) the origin/HEAD
  3. Symbols indicating the kind of changes
@Bradshaw
Bradshaw / list_lost_and_found.sh
Created June 15, 2021 09:33
List lost and found commits with a one-liner hash, relative date and commit message
#!/bin/bash
# Saves your life if you accidentally deleted a branch
regex="commit (.*)"
git fsck --lost-found | while read f; # unquoted in order to allow the glob to expand
do
if [[ $f =~ $regex ]]
then
@Bradshaw
Bradshaw / distort.sass
Created May 1, 2021 16:44
A little glitchy effect in Sass
@function randcol($steps: 2, $offset: 0)
@return hsl(random($steps)*(360/$steps)+$offset,100,50)
@function randoff($spread: 4)
@return #{-$spread+random()*2*$spread}px
@keyframes distort-julius
@for $i from 0 to 10
@if random()>0.3
@for $p from $i*10 through $i*10+9