Skip to content

Instantly share code, notes, and snippets.

View fadookie's full-sized avatar
🕹️
😹

Eliot Lash fadookie

🕹️
😹
View GitHub Profile
@fadookie
fadookie / Services.cs
Last active January 19, 2018 21:57
Service manager for unity (for accessing single instances of objects globally) and tests
using System;
using System.Collections.Generic;
/// <summary>
/// Simple service manager. Allows global access to a single instance of any class.
/// Copyright (c) 2014-2017 Eliot Lash
/// </summary>
public class Services
{
//Statics
@fadookie
fadookie / download_steam_app.sh
Created April 27, 2017 01:48
Steam downloader for non mac/linux games on mac/linux
#!/usr/bin/env bash
###
# This script uses SteamCmd to force downloads of games for other platforms.
# First, install SteamCmd from https://developer.valvesoftware.com/wiki/SteamCMD
# Place this script next to steamcmd.sh and make it executable (chmod u+x download_steam_app.sh)
# Finally, set the config to refer to your username. If you are already signed in to steam you should not need to enter a password.
#
# Usage:
# ./download_steam_app.sh <steam_store_url>
@fadookie
fadookie / gist:c71edcfe1e595f5cab374d4297ba1e02
Last active October 18, 2018 17:34 — forked from brentvatne/gist:a267d10eabd2d91a8d44
Auto-resizing text in pure js for react native, updated for RN 0.40
'use strict';
import React, { Component } from 'react';
import { findNodeHandle, StyleSheet, Text, View, NativeModules } from 'react-native';
const UIManager = NativeModules.UIManager;
class AutoresizeText extends Component {
constructor(props) {
super(props);
@fadookie
fadookie / bash_list_library.sh
Last active August 2, 2017 21:55
Example of bash array to pipe-delimited string de/serialization, for discussion at https://discuss.bitrise.io/t/output-from-multiple-instances-of-the-same-step/538
# WARNING! The following is not as safe as I originally thought and I'm not sure yet the right way to do this.
# See https://unix.stackexchange.com/questions/383541/how-to-save-restore-all-shell-options-including-errexit
enable_safety() {
BITRISE_CLI_PREVIOUS_SHELL_OPTIONS=$(set +o)
set -o nounset
set -o errexit
set -o pipefail
}
@fadookie
fadookie / .bash_profile
Last active November 16, 2016 21:33
.bash_profile for android/unity stuff
export JAVA_HOME=`/usr/libexec/java_home`
export ANDROID_HOME="$HOME/Dev/android/android-sdk-macosx" #Set this path to your android sdk
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:${ANDROID_HOME}/build-tools/$(ls ${ANDROID_HOME}/build-tools | sort -r | head -n 1)"
alias unilogcat='adb logcat|egrep "Unity|Kiwi|GamesUnitySDK|GamesNativeSDK|Supersonic|KONG|E API"'
@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