Skip to content

Instantly share code, notes, and snippets.

@tak-km
tak-km / TileBase.cs
Last active December 7, 2015 02:30
選択された時色を変えるタイル
using UnityEngine.EventSystems;// EventSystem利用
public class TileBase : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler,IPointerDownHandler {
private Color default_color; // 初期化カラー
private Color select_color; // 選択時カラー
protected Material _material;
void Start () {
// このクラスが付属しているマテリアルを取得
@tak-km
tak-km / 0_reuse_code.js
Created December 18, 2015 01:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tak-km
tak-km / gas_FormToCalender.gs
Last active December 5, 2016 09:10
googleフォームからカレンダーへ登録するスクリプト
function sendMailGoogleForm() {
// 件名、本文、フッター
var subject = "[イベント登録ありがとうございます。]";
var body
= "イベント登録ありがとうございます。\n\n"
+ "------------------------------------------------------------\n";
var footer
= "------------------------------------------------------------\n\n"
+ "";
@tak-km
tak-km / targets.cs
Last active January 23, 2017 14:29
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
float rayRange = 100f;
void Update () {
if (Input.GetMouseButtonDown(0)) {
if(Physics.Raycast(ray,out hit)) {
Vector3 targetPos = hit.point;
Debug.Log(targetPos);
Targets [count].transform.position = targetPos;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OccupyController : MonoBehaviour {
[SerializeField]
List<GameObject> soldierList1 = new List<GameObject>();
[SerializeField]
List<GameObject> soldierList2 = new List<GameObject>();
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OccupyController2 : MonoBehaviour {
[SerializeField]
List<GameObject> soldierList1 = new List<GameObject>();
[SerializeField]
List<GameObject> soldierList2 = new List<GameObject>();
@tak-km
tak-km / nfctest.py
Created May 16, 2017 05:48
readNFC
import binascii
import nfc
import pandas as pd
import urllib
import urllib2
class MyCardReader(object):
def on_connect(self, tag):
print "touched"
from __future__ import print_function
from future.standard_library import install_aliases
install_aliases()
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen, Request
from urllib.error import HTTPError
import json
import os
require 'discordrb'
require "csv"
#client_idはbotに設定されているものを入力 prefixはコマンドの呼び出しの時の記号(!play 等の!部分 ?とかでも可)
bot = Discordrb::Commands::CommandBot.new token: '自分のトークン', client_id: 000000000000, prefix: '!'
#スプラトゥーンの武器名が入っているcsvファイルを読み込み
data = CSV.read('buki.csv')
bot.command :random_buki do |event|
server = bot.servers.first[1]
#include <dlib/opencv.h>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
#include <dlib/image_processing.h>
#include <dlib/gui_widgets.h>
#include <sys/types.h>
#include <sys/socket.h>