Skip to content

Instantly share code, notes, and snippets.

@shop-0761
shop-0761 / trelloForGAS
Created November 3, 2017 11:57
trello + GAS する時の関数たち
//trelloの指定のボードIDを取得する関数
function getTrelloBoardID(trello_API_KEY, trello_TOKEN, trello_USERNAME, boardName){
var url = 'https://trello.com/1/members/' + trello_USERNAME + '/boards?key=' + trello_API_KEY + '&token=' + trello_TOKEN + '&fields=name';
var fetch = UrlFetchApp.fetch(url, {'method':'get'});
var json = JSON.parse(fetch);
for(var i in json){
if(json[i].name == boardName){
return json[i].id;
@shop-0761
shop-0761 / GameData.cs
Last active January 26, 2019 00:53
MessagePackでセーブとロードするやつ
//MessagePack をいれとく
//https://github.com/neuecc/MessagePack-CSharp/releases
//GameData.Load(gameObject) GameData.Save(gameObject) で使う
[MessagePack.MessagePackObject]
public class saveDataFormat
{
[MessagePack.Key(0)]
public string name;
[MessagePack.Key(1)]
@shop-0761
shop-0761 / MakeZipForGAS
Created November 16, 2017 01:03
GASでzipをつくるやつ
//フォルダの中身をzipにする関数
function makeZip(fileName, folderId){
var folder = DriveApp.getFolderById(folderId);
var fileList = folder.getFiles();
var archive = "";
var blobs = new Array();
while(fileList.hasNext()){
var file = fileList.next();
@shop-0761
shop-0761 / SelfManagementOfTrackedDevices.cs
Last active April 1, 2024 08:22
HMDなしでViveTrackerを使うサンプル
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class SelfManagementOfTrackedDevices : MonoBehaviour
{
public GameObject[] targetObjs;
public ETrackedDeviceClass targetClass = ETrackedDeviceClass.GenericTracker;
public KeyCode resetDeviceIds = KeyCode.Tab;
@shop-0761
shop-0761 / Hugo_appyaml
Created February 7, 2018 05:53
ホームページで使ってるapp.yaml
runtime: go
api_version: go1
handlers:
- url: /
static_files: public/index.html
upload: /
- url: /css
static_dir: public/css
- url: /fonts
@shop-0761
shop-0761 / SteamVR Plugin2.0 Input Sample.cs
Last active January 26, 2019 00:49
SteamVR Plugin 2.0 で入力を取るサンプル 要UniRx
using UnityEngine;
using Valve.VR;
using UniRx;
public class SteamVRNotifierBase
{
public string buttonName;
public bool isLeft;
}
@shop-0761
shop-0761 / Zaif succession agree mail
Last active December 13, 2018 04:46
Zaif 「承継同意に関するお手続きのご案内」メール
Date: 2018/11/28
Title:承継同意お手続きのお願い
Zaif
承継同意お手続きのお願い
日頃より仮想通貨取引所『Zaif』をご利用いただきましてありがとうございます。
度重なるご連絡、誠に恐れ入ります。11/22よりZaifの運営が弊社から株式会社フィスコ仮想通貨取引所に変更になりました。そのため、お客さまには本変更に関しまして、同意のお手続きをお願いしております。
@shop-0761
shop-0761 / fragWithSurfSample.shader
Last active January 26, 2019 16:26
fragment Shader 内で Surface shader を展開する例
#include "UnityPBSLighting.cginc"
fixed4 frag(v2f i) : SV_Target
{
Input surfIN;
UNITY_INITIALIZE_OUTPUT(Input, surfIN);
SurfaceOutputStandard o;
UNITY_INITIALIZE_OUTPUT(SurfaceOutputStandard, o);
surf(surfIN, o);
return fixed4(o.Albedo,0);
@shop-0761
shop-0761 / FragmentWithSurface.shader
Created February 11, 2019 12:40
Fragment と surface を一緒に使うやつ
Shader "Custom/fragmentWithSurface" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader {
Tags { "RenderType"="Opaque" }
@shop-0761
shop-0761 / ResolvedView
Last active January 30, 2024 01:40
UE4のResolvedView.hogehoge で取れそうなやつ
ResolvedView
{
float4x4 TranslatedWorldToClip;
float4x4 WorldToClip;
float4x4 TranslatedWorldToView;
float4x4 ViewToTranslatedWorld;
float4x4 TranslatedWorldToCameraView;
float4x4 CameraViewToTranslatedWorld;
float4x4 ViewToClip;
float4x4 ViewToClipNoAA;