Skip to content

Instantly share code, notes, and snippets.

@apkd
apkd / vscode-style.css
Created October 3, 2017 17:34
vscode stylesheet customization
.mtk4 {
font-family: 'Operator Mono Light';
font-style: italic;
font-size: 1.21em;
}
.monaco-workbench .panel.integrated-terminal .xterm .xterm-rows {
color: #fffeca;
font-family: "Monoid" !important;
font-size: 9px !important;
using UnityEngine;
public static partial class QuaternionExtensions
{
/// <summary>
/// Gradually changes a quaternion towards a desired goal over time.
/// The quaternion is smoothed by some spring-damper like function, which will never overshoot.
/// </summary>
/// <param name="current">Current rotation to interpolate from.</param>
/// <param name="target">Target rotation to interpolate to.</param>
import { Enumerable } from "powerseq/enumerable";
class KeyValuePair<T> {
key: string;
value: T;
}
class KvpDictionary<T> {
mapping: { [key: string]: T } = {}
public get keys(): Enumerable<string> {
WheelRight::^#Right
WheelLeft::^#Left
void OnValidate()
{
// remove non-unique and non-prefabs
ReplicablePrefabs =
ReplicablePrefabs
.Where(x => !x || x.IsPrefab())
.AppendItem(null as Replicable)
.Distinct()
.ToList();
@apkd
apkd / Comment.cs
Last active August 3, 2023 20:01
Double-click the text area to edit. https://tryfinally.dev/unity-comment-component
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Callbacks;
#endif
using System;
using System.Linq;
using UnityEngine;
using S = UnityEngine.SerializeField;
/// <summary>
using System;
using Serilog;
using Narochno.Serilog.Slack;
namespace SlackSinkWithDiscordExample
{
class Program
{
const string discord_webhook =
"https://discordapp.com/api/webhooks/{REDACTED}";
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RimWorld modlist</title>
<link rel="stylesheet" href="https://cdn.rawgit.com/markdowncss/modest/master/css/modest.css">
</head>
<body><h1>RimWorld modlist</h1>
<p>Author: <strong>apk</strong><br />