Skip to content

Instantly share code, notes, and snippets.

Verifying my Blockstack ID is secured with the address 16kTL3Le9AAX8A2nc4oUZ7VKVb5G4DKPHG https://explorer.blockstack.org/address/16kTL3Le9AAX8A2nc4oUZ7VKVb5G4DKPHG
@mingrui
mingrui / abc_test.py
Created February 13, 2018 16:06
testing abc
import abc
#class Base1(metaclass=abc.ABCMeta):
class Base1():
class_variable_one = 0
@abc.abstractmethod
def test_func(self):
pass
@mingrui
mingrui / CleanupMissingScripts.cs
Created July 28, 2017 02:15
Unity Editor Script to help cleaning up missing script references on gameobjects
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class CleanupMissingScriptsHelper{
[MenuItem("Edit/Cleanup Missing Scripts")]
static void CleanupMissingScripts() {
for (int i = 0; i < Selection.gameObjects.Length; i++) {
var gameObject = Selection.gameObjects[i];
@mingrui
mingrui / SmoothFollow.cs
Last active July 28, 2017 02:13 — forked from Hamcha/SmoothFollow.cs
Stupid Unity scripts : "Smooth Follow" from Standard Assets With Angle Offset
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
// The target angle offset, 180 is in front of the target, 0 is behind the target
public float angleOffset;
// The distance in the x-z plane to the target