Skip to content

Instantly share code, notes, and snippets.

View kimsama's full-sized avatar
🐢
I may be slow to respond.

Kim, Hyoun Woo kimsama

🐢
I may be slow to respond.
  • Bohemia Interactive Simulations
  • Seoul, Korea
View GitHub Profile
@kimsama
kimsama / client.c
Created January 18, 2011 02:58 — forked from fictorial/client.c
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#define SOCK_PATH "/tmp/test.sock"
@kimsama
kimsama / Debug.cs
Created November 21, 2012 04:38
It overrides UnityEngine.Debug to mute debug messages completely on a platform-specific basis. [Edit] Added isDebugBuild property.
//#if UNITY_EDITOR
//#define DEBUG
//#endif
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngineInternal;
@kimsama
kimsama / WaitForAnimationTrigger.cs
Created December 27, 2012 02:55
WaitForAnimationTrigger class for AIBehavior, Unity3D package. It waits until the animation is done by the given ratio, and changes to the specified state.
using UnityEngine;
using System.Collections;
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
///
/// WaitForAnimationTrigger class.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Spine;
/// <summary>
/// A Unity specific implementation of a skeleton controller.
/// </summary>
public class SkeletonController : MonoBehaviour
{
@kimsama
kimsama / gist:5317752
Last active December 15, 2015 20:19
A simple camel case string maker by using regexp. It may useful for making Unity3D's custom inspector gui with properties for ui constrol's name. (copied from http://www.example8.com/node/view/id/34476)
using System.Text;
using System.Text.RegularExpressions;
public static string SplitCamelCase(string inputCamelCaseString)
{
string sTemp = Regex.Replace(inputCamelCaseString, "([A-Z][a-z])", " $1", RegexOptions.Compiled).Trim();
return Regex.Replace(sTemp, "([A-Z][A-Z])", " $1", RegexOptions.Compiled).Trim();
}
@kimsama
kimsama / Plugin.cs
Last active December 16, 2015 02:19
Unity3D plugin usage for csharp. Original gist for Unity javascript can be found on https://gist.github.com/keijiro/1241999
import System.Runtime.InteropServices;
#if UNITY_IPHONE && !UNITY_EDITOR
[DllImport ("__Internal")] static extern private void _PluginFoo(int arg);
#else
static private void _PluginFoo(int arg) {
// iOS以外での代替処理。
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public class AssetBundleManager {
class AssetReference : IDisposable {
int count;
public AssetBundle bundle;
@kimsama
kimsama / EnterLoadPage.cs
Created May 1, 2013 05:28
MonoBehaviour supports async loading progress status. (original post from http://unitystudy.net/bbs/board.php?bo_table=tip&wr_id=52)
using UnityEngine;
using System.Collections;
public class EnterLoadPage : MonoBehaviour
{
public UISlider script;
public UISlider scriptPercent;
public UILabel textscript;
AsyncOperation async;
@kimsama
kimsama / CostumeAudioImporter.cs
Created May 1, 2013 05:34
A simple custom asset post processor script which disables '3D Sound' option of an imported sound asset.
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using System.Collections;
public class CostumeAudioImporter : AssetPostprocessor
{
void OnPreprocessAudio ()
{
AudioImporter audioImporter = assetImporter as AudioImporter;

Using Dropbox to Share Git Repositories

First, create a Git subfolder inside your Dropbox folder. Then you can share the individual projects inside that folder with whomever you want (or just use it for instant offsite backups).

From inside a Git project:

git clone --bare . ~/Dropbox/Git/gitproject.git
git remote add dropbox ~/Dropbox/Git/gitproject.git

When you're ready to push: