Skip to content

Instantly share code, notes, and snippets.

$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding
@masa795
masa795 / UnityTextures.cs
Created June 17, 2013 14:12
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{
#include <android/log.h>
class androidbuf: public std::streambuf {
public:
enum { bufsize = 128 }; // ... or some other suitable buffer size
androidbuf() { this->setp(buffer, buffer + bufsize - 1); }
private:
int overflow(int c) {
if (c == traits_type::eof()) {
*this->pptr() = traits_type::to_char_type(c);
@uzzu
uzzu / Tuple.cs
Last active December 20, 2015 14:49
Tuple implementation for unity3d (before .NET 4.0 environment)
using System;
using System.Collections;
using System.Text;
namespace System
{
/// <summary>
/// Tuple.
/// </summary>
public static class Tuple
@bhameyie
bhameyie / ModuleExtensions.cs
Last active April 16, 2020 05:05
An extension to render view as string with NancyFx
using System.IO;
using Nancy;
using Nancy.ViewEngines;
namespace Web.Modules
{
public static class ModuleExtensions
{
public static string RenderRazorViewToString(this NancyModule module, string viewName, object model)
{
@benblo
benblo / EditorCoroutine.cs
Created April 15, 2014 13:26
EditorCoroutine: coroutines for Unity editor operations. Usage: EditorCoroutine.start(myIEnumerator)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Swing.Editor
{
public class EditorCoroutine
@davidfowl
davidfowl / dotnetlayout.md
Last active April 26, 2024 13:37
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@felixjones
felixjones / pmx21.md
Last active May 2, 2024 20:23
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@adrian-afl
adrian-afl / MSAA shader resolving
Created March 23, 2015 16:05
MSAA shader resolving
#version 430 core
in vec2 UV;
layout(binding = 0) uniform sampler2DMS texColor;
layout(binding = 1) uniform sampler2DMS texDepth;
const int samples = 8;
float samplesInverted = 1.0 / samples;