Skip to content

Instantly share code, notes, and snippets.

View oktomus's full-sized avatar

Kevin Masson oktomus

View GitHub Profile
@oktomus
oktomus / substance_utils.py
Created July 7, 2020 06:34
Substance Designer Scripting utils
import sd
def print_selected_nodes_properties():
"""Show all inputs and outputs of a node."""
context = sd.getContext()
app = context.getSDApplication()
packageMgr = app.getPackageMgr()
uiMgr = app.getQtForPythonUIMgr()
node = uiMgr.getCurrentGraphSelection()[0]
@oktomus
oktomus / MaximizeStandaloneWindow.cs
Created July 31, 2020 13:25
Maximize Unity standalone window
using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using UnityEngine;
using System.Diagnostics;
/// <summary>
/// Source : https://improve.dk/minimizing-and-maximizing-windows/
/// </summary>
@oktomus
oktomus / tell_me_the_difference.py
Last active October 23, 2020 20:41
Tell me the difference
import requests
import urllib.request
import time
from bs4 import BeautifulSoup
import difflib
import os
import smtplib
import email.message
import io
I am attesting that this GitHub handle oktomus is linked to the Tezos account tz1YPLHAyrv1NUy8e1tB1bz9Ewwz3waTDpnU for tzprofiles
sig:edsigtqwkME8FMhC2W8YHUGiFTCpTj1VFDcGh1V8Ld2tRrCFz1uLcqDu6ESczbJn1UYETwZFh5dC3KMTQNrkq2bK1UZp4MHYESY
@oktomus
oktomus / ScriptCompilationTime.cs
Created March 30, 2023 11:04
Monitor time taken to recompile scripts in Unity and log it
using System;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEngine;
public static class ScriptCompilationTime
{
private const string FileName = ".AssemblyReloadStarted.txt";
private static readonly string FilePath = Path.Combine(Application.dataPath, FileName);