Skip to content

Instantly share code, notes, and snippets.

View uehara1414's full-sized avatar

uehara uehara1414

  • いつもニコニコあなたの隣に
View GitHub Profile
@uehara1414
uehara1414 / CameraManager.cs
Created July 6, 2016 15:31
Unityのデバッグ用の簡単なCamera操作スクリプト
using UnityEngine;
using System.Collections;
public class CameraManager : MonoBehaviour {
float flySpeed = 10;
GameObject defaultCam;
GameObject playerObject;
bool isEnabled;
@uehara1414
uehara1414 / Vagrantfile
Created June 19, 2016 06:25
Vagrantfile Template for CentOS7
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "geerlingguy/centos7"
config.vm.network :forwarded_port, guest: 80, host: 8000
config.vm.provision :shell, path: "bootstrap.sh"
end
実行ファイルのおいてある絶対パスは
path = require 'path'
path.dirname process.execPath
で得られる
ビルド後に外部ソースでrequire('nw.gui')などしたいときは、
ビルド前スクリプトで事前にfs.readFileSyncなどでJavaScriptのソースを読み込んでevalしてやるようにすればよい。
超危険だけど。
Hello World!!