Skip to content

Instantly share code, notes, and snippets.

NamekMaster / Color Preview.yml
Last active August 19, 2022 01:32
Popclip Snippet
View Color Preview.yml
# popclip abc
name: Color Preview
icon: square filled C
- title: RGB HEX
icon: square filled RGB
regex: ^#[0-9a-fA-F]{6}$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: RGBA HEX
icon: square filled RGBA
NamekMaster /
Last active June 30, 2022 02:14
Merge metadata from Google Photos takeout into file.
exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-CreateDate<CreationTimeTimestamp" "-ModifyDate<PhotoLastModifiedTimeTimestamp" -ext "*" -overwrite_original -progress --ext json Google\ Photos
NamekMaster / Foo.cs
Created June 21, 2022 05:20
CSharp source template example
View Foo.cs
using System.Collections.Generic;
using System.Globalization;
using JetBrains.Annotations;
using UnityEngine;
public static class Foo
public static void @for<T>(this int x, string i)
NamekMaster / ReadOnlyAttribute.cs
Created June 21, 2022 05:20
Unity read-only property on inspector view
View ReadOnlyAttribute.cs
using UnityEditor;
using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute
NamekMaster / FileExtensions.cs
Last active June 21, 2022 05:15
show file extensions in Unity hierarchy view, support one/two column and thumbnail
View FileExtensions.cs
using System;
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Reflection;
using Object = UnityEngine.Object;
public static class FileExtensions