Skip to content

Instantly share code, notes, and snippets.

View EliCDavis's full-sized avatar
👹
In another reality

Eli Davis EliCDavis

👹
In another reality
View GitHub Profile
@ffyhlkain
ffyhlkain / ReferenceFinder.cs
Last active October 18, 2023 00:54
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace FoundationEditor.Editor.ReferenceFinder
{
@yyscamper
yyscamper / parseFloat.go
Created August 2, 2017 06:59
An advance ParseFloat for golang, support scientific notation, comma separated number
package main
import (
"fmt"
"math"
"strconv"
"strings"
)
func ParseFloat(str string) (float64, error) {
W = 500
H = 585
W1 = W - 1
H1 = H - 1
def setup
@img = load_image '../scratch/girl.png'
@img.filter BLUR, 3
@img.load_pixels
end
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@aceslowman
aceslowman / CapsuleGeometry.js
Last active January 2, 2022 11:08
Capsule Geometry for ThreeJS
import * as THREE from "three";
/*
Implemented from a technique described here:
http://paulbourke.net/geometry/capsule/
PID2 taken from Paul Bourke's paulslib.h
PID2 = 1.570796326794896619231322;
ISSUES:
@kalebpace
kalebpace / screenshot.sh
Created April 13, 2018 06:42
Screenshot script that can be mapped to a shortcut. Rectangle select and copies straight to clipboard.
#!/bin/bash
PIC=~/Pictures/temp.png
sleep 0.2; scrot -s $PIC
xclip -selection clipboard -t image/png -i < $PIC
rm $PIC
@pcgeek86
pcgeek86 / install_go_pi.sh
Last active May 31, 2024 16:42 — forked from random-robbie/install_go_pi.sh
Install Go Lang on Raspberry Pi
cd $HOME
FileName='go1.13.4.linux-armv6l.tar.gz'
wget https://dl.google.com/go/$FileName
sudo tar -C /usr/local -xvf $FileName
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
@randalfien
randalfien / MarkUnused.cs
Last active October 24, 2022 09:51
Unity Mark Unused Assets
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public class MarkUnused
{
private const string UnusedLabel = "Unused"; // All unused assets will be tagged with this label
@sketchpunk
sketchpunk / _CURVES_IN_JS.md
Last active April 5, 2024 18:42
Curves in Javascript

Curves in Javascript

Collection of algorithms related to using curves written in javascript.

Curve Types

  • Cubic Bezier Splines : inc. derivative, 2nd derivative, normals, easing
  • Catmull Rom
  • Kochanek Bartels ( TCB Splines ) : inc. derivative
  • Lemniscate of Bernoulli and Gerono : inc. derivative
  • Watt's Curve
  • Torus Knot : inc. derivative, 2nd derivative
using UnityEditor;
using UnityEngine;
/// <summary>
/// Hierarchy window game object icon.
/// http://diegogiacomelli.com.br/unitytips-hierarchy-window-gameobject-icon/
/// </summary>
[InitializeOnLoad]
public static class HierarchyWindowGameObjectIcon
{