Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active December 4, 2024 11:15
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
namespace UnityEngine.UI
{
[RequireComponent( typeof( RectTransform ) ), RequireComponent( typeof( Graphic ) ), DisallowMultipleComponent, AddComponentMenu( "UI/Flippable" )]
public class UIFlippable : MonoBehaviour, IMeshModifier
{
@steven2358
steven2358 / ffmpeg.md
Last active December 18, 2024 09:08
FFmpeg cheat sheet
@andyrbell
andyrbell / scanner.sh
Last active December 17, 2024 06:59
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@nessus42
nessus42 / destiny-networking-revised.md
Last active April 19, 2024 21:39
How Networking Works in Destiny 1 and How It Will Differ in Destiny 2 (According to Bungie, Redux)
@luciditee
luciditee / BatchBurner.cs
Last active June 16, 2018 17:09
Batch Burner, a script designed to reduce static mesh draw calls in Unity scenes with a large number of static mesh entities.
/*
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes
* with a large amount of static geometry entities.
*
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
/// <summary>
/// Returns a position on the edge of the screen
/// </summary>
/// <param name="horizontal">0 being left, and 1 being right</param>
/// <param name="vertical">0 being botton, and 1 being top of the screen</param>
/// <param name="horizontalPadding">Padding from the screen, 0 means on screen, and 0.1 will be 10% off the screen</param>
/// <param name="verticalPadding"> </param>
/// <returns></returns>
public Vector3 GetOffScreenPosition(float horizontal,
float vertical,
@brunomikoski
brunomikoski / TriggerVolume.cs
Created September 28, 2015 19:28
General trigger for detecting collisions
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[RequireComponent(typeof(Collider))]
/// <summary>
/// General purpose trigger volume system
///
/// </summary>
/// <author>Bruno Mikoski</author>
@GetUpKidAK
GetUpKidAK / ExportTextures.jsx
Last active February 8, 2022 08:46
Photoshop script to export textures from layered PSD
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Enables exporting of several PBR texture maps from a single PSD with a few clicks:
//
// 1. Select an export folder
// 2. Choose which PSD layer group corresponds to which map (split into separate RGB/Alpha channels)
// 3. Change the file export options (if required)
// 4. Hit export.
//
// Created by Ash Kendall. ash.kendall(at)gmail.com
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnEnable()
{
Application.RegisterLogCallback(HandleUnityLog);
}
private void OnDisable()
{
Application.RegisterLogCallback(null);
}