Skip to content

Instantly share code, notes, and snippets.

View yamahigashi's full-sized avatar

yamahigashi

View GitHub Profile
@keijiro
keijiro / PostprocessBuildPlayer
Created September 26, 2011 11:24
PostprocessBuildPlayer for Unity iOS: modifies Info.plist to use Facebook URL-scheme
#!/usr/bin/env python
import sys, os.path
install_path = sys.argv[1]
target_platform = sys.argv[2]
if target_platform != "iPhone": sys.exit()
info_plist_path = os.path.join(install_path, 'Info.plist')
@yoggy
yoggy / explanation_of_eye_grep_reloaded_in_avtokyo2012.md
Created November 20, 2012 09:01
君にもできる目grepを使わない目grepリローデッドへの挑戦 (010 Editor編)

君にもできる目grepを使わない目grepリローデッドへの挑戦 (010 Editor編)

はじめに

2012/11/17に開催されたAVTokyo2012の中で「目grepリローデッド」という題目で murachue氏、ucq氏が目grep力を競うイベントが行われた。

その際に愛甲氏によって出題された問題が以下のURLで公開されている。

@justinfx
justinfx / maya_script_editor.py
Last active March 8, 2024 18:33
An example of how to use multiprocessing from within Maya, by actually running it as a subprocess and communicating back the results.
"""
This code can be run from a Maya script editor
"""
import subprocess
import cPickle
print 'This value below should be a 1000:'
p = subprocess.Popen(["/path/to/multi_test.py", "-po"], stdout=subprocess.PIPE)
result = cPickle.load(p.stdout)
@OmniZ3D
OmniZ3D / getSelectedOrder.py
Created June 27, 2013 10:00
getSelectedOrder (MotionBuilder) snippet function via pyfbsdk FBGetSelectedModels
from pyfbsdk import *
def getSelectedOrder():
# selectionOrder selection order
# Get the current selection
lModelList = FBModelList()
pParent = None
pSelected = True
pSortSelectedOrder = True
FBGetSelectedModels( lModelList, pParent, pSelected, pSortSelectedOrder )
@mstevenson
mstevenson / SaveFBX.cs
Created August 5, 2013 20:05
ASCII FBX file exporter for Unity. Extracted from Michal Mandrysz's Unity Summer of Code 2009 external lightmapping project.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
/*
@inohiro
inohiro / detect_fbx_format.rb
Created August 15, 2013 15:32
Detect fbx format (Binary one or ASCII one) with ruby
FILE_PATH = File.expand_path './file.fbx'
CORRECT = %w"K a y d a r a \ F B X \ B i n a r y \ \ "
def binary_fbx? file_path
File.open( file_path, 'rb' ) do |file|
CORRECT.each do |char|
num = file.read( 1 )
false if num != char
end
@johnjohndoe
johnjohndoe / android-sdk-setup.sh
Last active June 12, 2019 08:31
Creating symbolic links in Android SDK folder. After Android-Studio resp. IntelliJ will work with Maven and Gradle.
#!/bin/bash
# Author: Tobias Preuss
# Version: 2018-01-05
echo "Creating symbolic links in Android SDK folder"
echo "============================================="
echo
if [ -z "$ANDROID_HOME" ] ; then
# In mymodule.py
from zope.proxy import ProxyBase, setProxiedObject
hoge = ProxyBase(None)
def setup_hoge():
setProxiedObject(hoge, 'hoge')
@tsubaki
tsubaki / UnityAppController.mm
Created December 12, 2013 01:17
ディクテーションでUnityが落ちる対策。Unityが出力したファイルのUnityAppController.mmのrepaintメソッドのSetupUnityDefaultFBOの上にEAGLContextSetCurrentAutoRestore云々の部分を追加する
- (void)repaint
{
EAGLContextSetCurrentAutoRestore autorestore(_mainDisplay->surface.context);
SetupUnityDefaultFBO(&_mainDisplay->surface);
// ...
}
@cyrilmottier
cyrilmottier / CityBikesContract.java
Last active January 12, 2024 18:04
Using the new Gradle-based Android build system: a second example
package com.cyrilmottier.android.citybikes.provider;
import android.net.Uri;
import com.cyrilmottier.android.avelov.BuildConfig;
/**
* @author Cyril Mottier
*/
public class CityBikesContract {