Skip to content

Instantly share code, notes, and snippets.

View toshikaz55's full-sized avatar

Toshikazu Ohtsuki toshikaz55

View GitHub Profile
@toshikaz55
toshikaz55 / unity_bullet
Created March 24, 2014 06:41
Unityで弾を発射するスクリプト javascript版(iOS & Android対応)
#pragma strict
var bulletPrefab : GameObject;
var initialVelocity : float = 40.0;
var canonY = 1.5;
var canonZ = 0.3;
private var direction : Vector3;
private var fireObject : GameObject;
@toshikaz55
toshikaz55 / CharactorControl.cs
Created December 12, 2013 12:57
UnityでキャラクターをHorizontal方向に動かすC#スクリプト
using UnityEngine;
using System.Collections;
public class motionCtrl : MonoBehaviour {
Animator animator;
CharacterController character;
// Use this for initialization
void Start () {
@toshikaz55
toshikaz55 / JoystickToEvents.cs
Last active December 24, 2015 23:59
UnityでiOS、Android用にジョイスティックを追加した時にLocomotion で操作するには、Joystickを使う。
using UnityEngine;
using System.Collections;
public class JoystickToEvents : MonoBehaviour
{
public static void Do(Transform root, Transform camera, ref float speed, ref float direction)
{
Vector3 rootDirection = root.forward;
float horizontal;
float vertical;
@toshikaz55
toshikaz55 / chef_recipe_default.rb
Created June 3, 2013 11:42
Chef install App, setting files
#
# Cookbook Name:: instApp
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
log "install some apps"
@toshikaz55
toshikaz55 / Install Vagrant_Knife-solo_and_Chef-solo
Last active December 17, 2015 18:39
Install Vagrant, Knife-solo and Chef-solo
/Users/toshikaz% sudo gem install vagrant
Password:
Fetching: archive-tar-minitar-0.5.2.gem (100%)
Fetching: ffi-1.8.1.gem (100%)
Building native extensions. This could take a while...
Fetching: childprocess-0.3.9.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: i18n-0.6.4.gem (100%)
Fetching: log4r-1.1.10.gem (100%)
Fetching: net-ssh-2.2.2.gem (100%)
@toshikaz55
toshikaz55 / How_to_setup_Pebble_E_Paper_Smart_watch_SDK_log
Last active December 16, 2015 06:49
How to setup Pebble E-Paper Smart watch SDK on MacOSX 10.8.3
Ref.
Step 2. Install the SDK toolchain & Compile a watch face from source code
http://developer.getpebble.com/1/01_GetStarted/01_Step_2
/Users/toshikaz% cd works/pebble-sdk-release-001/
/Users/toshikaz/works/pebble-sdk-release-001% ls
README.md demos/ sdk/ templates/ tools/ watches/
/Users/toshikaz/works/pebble-sdk-release-001% mdview README.md
@toshikaz55
toshikaz55 / gist:5329629
Last active December 15, 2015 21:59
macで右クリックメニューの「このアプリケーションで開く」が重複している時の整理方法
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -f -all local,system,user
Ref.
Macの「このアプリケーションで開く」欄に異常がある場合の対処方法 / Inforati
http://inforati.jp/apple/mac-tips-techniques/system-hints/how-to-fix-duplicate-application-in-open-with-context-menu-of-mac-os.html
@toshikaz55
toshikaz55 / rbenvInstallRuby193p392
Last active December 15, 2015 05:59
Install Ruby 1.9.3p392 on MacOSX by rbenv
% sudo brew install rbenv
==> Downloading https://github.com/sstephenson/rbenv/tarball/v0.4.0
Already downloaded: /Library/Caches/Homebrew/rbenv-0.4.0.tgz
==> Caveats
To enable shims and autocompletion add to your profile:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
To use Homebrew's directories rather than ~/.rbenv add to your profile:
export RBENV_ROOT=/usr/local/var/rbenv
==> Summary
;;; start.el
;; Seiji Zenitani's configuration for Emacs 22/23.
;; I put this file in ~/lib/emacs/ and then byte-compile it.
;; The *.elc file is loaded from the following .emacs.el:
;;
;; ;; load all *.elc files...
;; (mapcar (lambda (x)(load-file x))(directory-files "~/lib/emacs" t "\\.elc$"))
@toshikaz55
toshikaz55 / How to set github.password from mac keychain
Last active December 15, 2015 03:29
githubのパスワードをmacのKeychainから取得する方法
gistに書いてあるmacのキーチェーン使って、githubのパスワードを平文で持たない方法、意味がよくわからなかったが、
.gitconfigのパスワードを置換しろってことだった
defunkt/gist · GitHub
https://github.com/defunkt/gist/
% less ~/.gitconfig
(snip)
[github]
user = toshikaz55