cd $(getconf DARWIN_USER_DIR)/com.apple.dock.launchpad/db
sqlite3 --column --head db
delete from apps where title='<CASE_SENSITIVE_APPNAME>';
delete from apps where title='EpicWebHelper';
code --list-extensions | xargs -L 1 echo code --install-extension > ~/install_vscode_extensions.sh | |
chmod +x ~/install_vscode_extensions.sh | |
cd ~/Library/Application\ Support/Code/User | |
tar -czf vscode_config.tar.gz *.json | |
mv vscode_config.tar.gz ~/vscode_config.tar.gz |
import os | |
import re | |
def sorted_alphanumeric(data): | |
convert = lambda text: int(text) if text.isdigit() else text.lower() | |
alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ] | |
return sorted(data, key=alphanum_key) | |
cwd = os.path.dirname(os.path.realpath(__file__)) | |
os.chdir(cwd) |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
public class CreatePivotFromSelection | |
{ | |
static void CreatePivot(Vector3 offset) | |
{ | |
if (Selection.gameObjects == null || Selection.gameObjects.Length <= 0) |
import json | |
import os | |
import plugin_api | |
# | |
def IsUsefulInput(viewtype): | |
return viewtype == "CBV" or viewtype == "IBV" or viewtype == "VBV" or viewtype == "SRV" | |
def DumpBufferByDrawcall(folder, call, res, id, texture): | |
if not os.path.exists(folder): |
using UnityEngine; | |
[ExecuteInEditMode] | |
public class DrawBones : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
public bool ShowHierarchyAlwyas = true; | |
public bool ShowSelectedBoneName = true; | |
public Color BoneColor = Color.white; | |
public Color SelectedBoneColor = Color.red; |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
namespace P4 | |
{ | |
class P4OutputStream : IDisposable | |
{ | |
public StreamReader Reader { get; set; } |
// https://en.wikipedia.org/wiki/Ordered_dithering | |
half threshold4x4[16] = { | |
1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, | |
13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, | |
4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, | |
16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 | |
}; | |
half threshold8x8[64] = { | |
1.0 / 65.0, 49.0 / 65.0, 13.0 / 65.0, 61.0 / 65.0, 4.0 / 65.0, 52.0 / 65.0, 16.0 / 65.0, 64.0 / 65.0, |
#if UNITY_EDITOR | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
public class LightmapAssist : EditorWindow | |
{ | |
[MenuItem("Window/Lighting/Lightmap Assistant")] | |
public static void ShowLightmapAssistWnd() |
# porting from https:#github.com/google/spherical-harmonics for blender [WIP] | |
import math, mathutils | |
from random import random, uniform | |
PI = math.pi | |
TWO_PI = 2.0 * PI | |
FACTORIAL_CACHE = [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000] | |
DOUBLE_FACTORIAL_CACHE = [1, 1, 2, 3, 8, 15, 48, 105, 384, 945, 3840, 10395, 46080, 135135, 645120, 2027025] | |
FACTORIAL_CACHESIZE = 16 |