Skip to content

Instantly share code, notes, and snippets.

View nutti's full-sized avatar

nutti nutti

View GitHub Profile
@nutti
nutti / cleanup_env.sh
Last active August 29, 2015 14:14
[PhoneGap/Cordova] InAppBrowserを用いてDatabase.comの認証をする方法 ref: http://qiita.com/nutti/items/a154b6ef0c0608bd99ec
$ cordova platform rm ios
@nutti
nutti / optimize_sample_1.py
Created January 24, 2015 07:39
[Blender] BlenderプラグインをBlender本体に取り込んでもらうまでの流れ ref: http://qiita.com/nutti/items/a63eb404a506c2081be2
>>> l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> double_l = []
>>> for i in l:
... double_l.append(i * 2)
...
>>> double_l
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
@nutti
nutti / Fixed_GUI_Layout.js
Last active August 29, 2015 14:11
[Unity] 複数の端末の解像度に対応させる2 - GUITexutreの表示を解像度と非依存にする ref: http://qiita.com/nutti/items/f4e0d4241480345a2b10
#pragma strict
var aspectRatioCtrl : Fixed_Aspect_Ratio = null; // 解像度固定スクリプト
var x : float = 0.0f; // 表示位置(X座標)
var y : float = 0.0f; // 表示位置(Y座標)
var width : float = 1.0f; // 横幅
var height : float = 1.0f; // 縦幅
function Update()
{
@nutti
nutti / .wgetrc
Last active August 29, 2015 14:10
[Linux] wgetをプロキシ経由で実行する方法 ref: http://qiita.com/nutti/items/4ed09d3d61ccad49069b
http_proxy=http://${xxx.xxx.xxx.xxx}:${pp}/
proxy_user=${user}
proxy_password=${pass}
@nutti
nutti / Aspect_Ratio_Controller-part1.js
Last active August 29, 2015 14:10
[Unity] 複数の端末の解像度に対応させる1 - Sceneに表示される解像度を固定化する ref: http://qiita.com/nutti/items/733f296c5a09b6867baa
var offset : Vector2 = Vector2(0.0f, 0.0f); // 中心からのずれ
var scale : Vector2 = Vector2(1.0f, 1.0f); // カメラの拡大率
var cam : Camera = null; // アスペクト比を固定化するカメラ
private var width : float = 640.0f; // 横幅 (目標解像度)
private var height : float = 960.0f; // 高さ (目標解像度)
var targetAspect : float; // 目標のアスペクト比
var curAspect : float; // 補正前の「Scene」のアスペクト比
var ratio : float; // 補正前の「Scene」のアスペクト比 ÷ 目標のアスペクト比
@nutti
nutti / menu_1.py
Last active August 29, 2015 14:10
[Blender] プラグインでサブメニューを作成する方法 ref: http://qiita.com/nutti/items/3f75f34adab99a805a35
# メニュー
class CHoge(bpy.types.Operator):
bl_idname = "uv.hoge" # ID名
bl_label = "Hoge Menu" # メニューに表示される文字列
bl_description = "Hoge Piyo" # メニューに表示される説明文
bl_options = {'REGISTER', 'UNDO'}
# 実際にプラグインが処理を実施する処理
def execute(self, context):
@nutti
nutti / hoge.py
Last active September 5, 2015 13:16
[Blender] Blenderプラグインの作り方 ref: http://qiita.com/nutti/items/a836391723bd28cd3e4c
# メイン関数
if __name__ == "__main__":
register()