This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.IO; | |
using System.Collections.Generic; | |
public class Frame | |
{ | |
public static int VERSION = 1; | |
public double Timestamp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. List all the daemons running on you mac that are not published by apple. | |
# Search on google any name that you do not trust. | |
# MacKeeper has at least one with a strange name. | |
launchctl list | grep -v com.apple | |
# 2. Remove all the suspecious daemons. | |
# You won't be able to simply kill -9, they all restart each other and redownload themselves. | |
launchctl remove com.malware.something | |
# 3. Remove all associated files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Faster toolchain build: skips as much as possible. | |
# | |
# To use this toolchain from the command line:" | |
# export TOOLCHAINS=$(whoami) | |
# | |
# we build to the same prefix every time (instead of building | |
# to a versioned prefix) because every time the prefix changes | |
# *everything* rebuilds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import base64 | |
import collections | |
import datetime | |
import json | |
import plistlib | |
import sys | |
import tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class LinkedCamera : MonoBehaviour { | |
// What transform to chase: | |
public Transform target; | |
// Debug keyboard controls: | |
public KeyCode modifier; | |
public KeyCode incSmooth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CompanionCamera : MonoBehaviour { | |
// Debug shortcut keys: | |
public KeyCode modifier; | |
public KeyCode toggleButton; | |
// If true, this will permanently disable the SteamVR companion camera. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Make sure you have installed ImageMagick | |
# http://cactuslab.com/imagemagick/ | |
# Ensure we're running in location of script. | |
cd "`dirname $0`" | |
for f in *; do | |
if [[ $f == *@3x* ]]; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Swift classes implementing the GKMinmaxStrategizer protocols, without any logic. | |
You can use these as a template, copy & paste them into your project and start working. ;) | |
This gist is provided by http://tilemapkit.com and released into public domain. | |
Here's my tutorial about GKMinmaxStrategist: http://tilemapkit.com/2015/07/gkminmaxstrategist-build-tictactoe-ai/ | |
*/ | |
class TheGameModel: NSObject, NSCopying, GKGameModel { |
NewerOlder