This file contains hidden or 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
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
public class BakeRenderTexture | |
{ | |
[MenuItem("Assets/Bake RenderTexture to PNG")] | |
static void Bake() | |
{ | |
// Get selected RenderTexture |
This file contains hidden or 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
/* | |
gcc -I/usr/local/include/freetype2 -lfreetype glyph2dot.c -o glyph2dot | |
./glyph2dot hoge.ttf 0 A | dot -Kfdp -n -Tpng -o A.png | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ft2build.h> | |
#include FT_FREETYPE_H |
This file contains hidden or 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
#!/bin/bash | |
# | |
# opt9p.sh | |
# Optimize 9-patch images by shrinking inner region. | |
# Copyright 2015 Nobuki Yoda. | |
# | |
# Usage: | |
# L=10 W=1 R=10 T=10 H=1 B=10 ./opt9p in.png out.png | |
# | |
# Simple Usage: |
This file contains hidden or 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
/* | |
bookmarkletify twitter-maasai.js | |
javascript:(function(){;var%20x=$(%22.media-image%22);var%20y=x.clone().appendTo(%22body%22).css(%7Bposition:%22absolute%22,top:x.offset().top,left:x.offset().left,zIndex:5e3%7D).animate(%7Btop:$(window).scrollTop()-x.height()%7D,300,%22swing%22,function()%7By.remove()%7D);x.css(%7Bopacity:0%7D).delay(1e3).animate(%7Bopacity:1%7D);})() | |
*/ | |
var x = $('.media-image'); | |
var y = x.clone().appendTo('body') | |
.css({position: 'absolute', top: x.offset().top, left: x.offset().left, zIndex: 5000}) | |
.animate({top: $(window).scrollTop() - x.height()}, 300, 'swing', function(){y.remove()}); | |
x.css({opacity:0}).delay(800).animate({opacity:1}); |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class FindStap | |
{ | |
public static void Main() | |
{ | |
var rand = new Random(); |
This file contains hidden or 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:$("#header_logo img").before('<div style="width:55px;overflow:hidden;float:left"><img src="https://www.python.org/static/img/python-logo.png" height="60"></div>').wrap('<div style="width:145px;overflow:hidden"></div>').css('position', 'relative').css('left', '-55px') |
This file contains hidden or 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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// 「Window/SerializedObject Editor」で起動。 | |
/// 選択中のObjectと関連ObjectからSerializedObjectを作ってPropertyを全て表示する。 | |
/// </summary> | |
public class SerializedObjectEditor : EditorWindow |
This file contains hidden or 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
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.IO; | |
public static class TextureGenerator | |
{ | |
static string GetNewPath(string name) | |
{ | |
string path = AssetDatabase.GetAssetPath(Selection.activeObject); |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
using System.Linq; | |
// タッチザナンバーをLINQを乱用して書いてみた. | |
// 数字が0から始まることに注意. | |
public class TouchTheNumberLINQ : MonoBehaviour | |
{ | |
public int len = 5; //横方向のマス数=縦方向のマス数 |
NewerOlder