Skip to content

Instantly share code, notes, and snippets.

View fadookie's full-sized avatar
🕹️
😹

Eliot Lash fadookie

🕹️
😹
View GitHub Profile
@fadookie
fadookie / gist:7ae5cbec94245609165efee08da21c17
Created September 30, 2016 19:49
git quote-string test output
$ git quote-string
foo "bar"
"!foo \"bar\"
#"
@fadookie
fadookie / strip.conf
Last active June 4, 2016 00:28 — forked from dextorer/strip.conf
google-play-services-strip-script
actions=false
ads=true
analytics=false
appindexing=false
appstate=true
auth=true
cast=false
common=true
drive=true
dynamic=false
/// <summary>
/// Handles parsing and execution of console commands, as well as collecting log output.
/// Copyright (c) 2014-2015 Eliot Lash
/// </summary>
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Text;
@fadookie
fadookie / 92-C# Class-NewClass.cs.txt
Last active January 10, 2018 03:35
Some handy Create file templates for Unity 5.2
namespace ExampleNamespace
{
public class #SCRIPTNAME#
{
}
}
@fadookie
fadookie / Barycentric3.cs
Last active November 28, 2020 08:24
Barycentric coordinate wrapper for Unity Vector3. Optimized mesh extension methods for picking random points on a mesh or submesh.
/// <summary>
/// Wrapper/utility class for Vector3 that provides methods for manipulating Barycentric coordinates.
///
/// Uses math from http://answers.unity3d.com/answers/613726/view.html
///
/// Copyright (c) 2015 Eliot Lash
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
@fadookie
fadookie / Standard-noFog.shader
Last active May 16, 2022 10:26
Unity 5.2.1f1 Standard Shader with Fog disabled.
Shader "Custom/Standard (No fog)"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
@fadookie
fadookie / hover-export.js
Last active August 29, 2015 14:26
DNS zone file
// Hover.com "Zone file import/export" has been *Planned* since 2011
// https://help.hover.com/entries/471066-Zone-file-import-export
// Here's a brittle approximation of export.
//
// 1. login to your account: https://www.hover.com/domains
// 2. run the following in your browser's JavaScript console, changing the first line
// to your domain
// 3. copy the text logged to the console.
// 4. manually correct FQDNs, these have to end with a period "."
//
@fadookie
fadookie / build_and_install_soomla.sh
Created March 24, 2015 14:35
A script to build the SOOMLA Store Android plugin from source and install it into a Unity project. Read comments in the file header for setup instructions.
#!/bin/bash
# This script is designed to build the SOOMLA Store android plugin, and install it into a Unity game.
# Update the variables in the config section below to customize for your environment.
#
# Copyright (c) 2014 Eliot Lash
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@fadookie
fadookie / runAndroid.sh
Last active September 21, 2022 08:56
Script to install, run, and open logcat for a Unity Android App
#!/bin/sh
# Script to install, run, and open logcat for a Unity Android App.
# I needed this as one of my libraries has a critical post-build script so I can't use "Build and Run" anymore - this is the "and Run" part.
# Be sure to update these variables to match your app's publishing/build settings:
APK_PATH='builds/android/basecode.apk'
BUNDLE_ID='com.eliotlash.basecode'
alias unilogcat='adb logcat|egrep "Unity"'
adb install -r "${APK_PATH}" && adb logcat -c && adb shell am start -n "${BUNDLE_ID}/com.unity3d.player.UnityPlayerNativeActivity" && echo 'DONE, LOG:' && unilogcat
@fadookie
fadookie / SpawnArea.cs
Created January 27, 2015 19:41
Spawn area component for Unity, spawns prefabs in a defined 2D area
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(BoxCollider2D))]
public class SpawnArea : MonoBehaviour {
public GameObject spawnedPrefab;
BoxCollider2D spawnArea;
Vector2 maxSpawnPos;
float lastSpawnTimeS = -1;