This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://gist.github.com/eral/4123759 | |
#if defined(__INTEL_COMPILER) | |
# include <cstring> | |
#endif | |
#if defined(__GNUC__) | |
# include <cxxabi.h> | |
#endif | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var w = window; | |
var d = document; | |
var u; | |
var h = d.location.href; | |
if (-1 != h.search(/^http:\/\/ext\.nicovideo\.jp\/api\/getthumbinfo\/\w{2}\d+/)) { | |
var v = d.getElementsByTagName("video_id")[0].innerHTML; | |
h = d.getElementsByTagName("title")[0].innerHTML; | |
var t = d.getElementsByTagName("length")[0].innerHTML; | |
w.alert('今日の作業BGM #nowplaying / ' + h + ' (' + t + ') #' + v + ' http://nico.ms/' + v); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2014 ERAL | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[CustomPropertyDrawer(typeof(QuaternionEulerAttribute))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2014 ERAL | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
using UnityEngine; | |
namespace Swizzle { | |
static class ColorExtensions { | |
#region Color←1D swizzle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2014 ERAL | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[CustomPropertyDrawer(typeof(EnumMaskAttribute))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by ERAL | |
// This is free and unencumbered software released into the public domain. | |
using UnityEngine; | |
public class OriginalMaterial : ScriptableObject { | |
public string m_data; | |
#if UNITY_EDITOR | |
private const string menuName = "Original Material"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by ERAL | |
// This is free and unencumbered software released into the public domain. | |
function GetCursorPosition() { | |
return {'x':0|Editor.ExpandParameter('$x'), 'y':0|Editor.ExpandParameter('$y')}; | |
} | |
function SetCursorPosition(pos) { | |
var is_text_selected = 0 != Editor.IsTextSelected(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2014 ERAL | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
var is_text_selected = Editor.IsTextSelected(); | |
if (1 == is_text_selected) { | |
Editor.BeginSelect(); | |
} | |
Editor.BracketPair(); | |
if (1 == is_text_selected) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (C) 2014 ERAL | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using System.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by ERAL | |
// This is free and unencumbered software released into the public domain. | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class CancelableLinq { |
OlderNewer