Skip to content

Instantly share code, notes, and snippets.

View Densyakun's full-sized avatar
🥴
ああああああああああああああああ

電車君 Densyakun

🥴
ああああああああああああああああ
View GitHub Profile
@tsubaki
tsubaki / Lookat.cs
Created July 2, 2017 13:33
マウスの位置を向く
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Lookat : MonoBehaviour
{
Plane plane = new Plane();
float distance = 0;
void Update()
@tsubaki
tsubaki / ObjectDeplicate.cs
Last active February 24, 2019 15:55
()無しで元オブジェクトの下に生成する
using UnityEngine;
using UnityEditor;
public class ObjectDeplicate
{
[MenuItem("Edit/DummyDeplicate %d", false, -1)]
static void CreateEmptyObjec2t()
{
foreach (var obj in Selection.objects)
{
@261shimizu
261shimizu / GUIでのリモート接続.md
Last active November 13, 2023 05:40
リモート接続周りの話(SSH,リモートデスクトップ等)

GUIのリモート接続

VNCとリモートデスクトップ


SSHではGUIが使えない
GUIのリモート接続を実現するには、VNCやRDPを使う

※リモート接続でなく、ローカルでのCUI⇔GUIは、「runlevel変更.md」を参照のこと

VNCとRDP比較

@vkz
vkz / escodegen-comments.js
Last active February 6, 2023 17:54
Preserve comments with Esprima + Escodegen combination
// escodegen has a fucked up API for attaching comments
// https://github.com/estools/escodegen/issues/10
var esprima = require("esprima");
var es = require("escodegen");
var ast = esprima.parse(
'//comment here\nvar answer = 42;',
{range: true, tokens: true, comment: true});
// attaching comments is a separate step
@msikma
msikma / rfc5646-language-tags.js
Created February 26, 2015 13:51
RFC 5646 Language Tags
// List of language tags according to RFC 5646.
// See <http://tools.ietf.org/html/rfc5646> for info on how to parse
// these language tags. Some duplicates have been removed.
var RFC5646_LANGUAGE_TAGS = {
'af': 'Afrikaans',
'af-ZA': 'Afrikaans (South Africa)',
'ar': 'Arabic',
'ar-AE': 'Arabic (U.A.E.)',
'ar-BH': 'Arabic (Bahrain)',
'ar-DZ': 'Arabic (Algeria)',
@tsubaki
tsubaki / ScrollController.cs
Created December 17, 2014 18:28
uGUIのノードをダイナミックに作りたい場合のアレ。
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ScrollController : MonoBehaviour {
[SerializeField]
RectTransform prefab = null;
void Start ()
@tsubaki
tsubaki / InstantateAsyncManager.cs
Created August 20, 2014 15:41
擬似非同期の読込
using UnityEngine;
using System.Collections;
public class InstantateAsyncManager : MonoBehaviour {
public static InstantateAsyncManager Instance;
void Awake () {
Instance = this;
}