Skip to content

Instantly share code, notes, and snippets.

Avatar

Toru Yoshioka toofusan

View GitHub Profile
@toofusan
toofusan / FreeeEventHandler.cs
Last active Nov 30, 2018
freee APIを使ったVR勤怠打刻の実装例
View FreeeEventHandler.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Freee;
public class FreeeEventHandler : MonoBehaviour {
Freee.Client client;
@toofusan
toofusan / JsonHelper.cs
Last active Feb 26, 2017
TwitterAPIClient for UnityWebRequest (beta)
View JsonHelper.cs
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
public class JsonHelper {
public static string ArrayToObject (string arrayString) {
if (arrayString.StartsWith ("[")) {
arrayString = "{\"items\":" + arrayString + "}";
View index.html
<!doctype html>
<html>
<head>
<title>Socket.IO chat</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 13px "Source Sans Pro", Helvetica, Arial, 游ゴシック体, YuGothic, メイリオ, Meiryo, sans-serif; }
#top-fixed {padding 5px 0px; position: fixed; top: 0; width: 100%;}
#bottom-fixed {padding 5px; position: fixed; bottom: 0; width: 100%;}
#container { padding: 15px 5px;}
@toofusan
toofusan / a4typobot.js
Last active Dec 16, 2016
twitter bot with tumblr image http://a4typo.tumblr.com/
View a4typobot.js
'use strict';
// Tumblr Authenticate
const Tumblr = require('tumblr.js');
const tumblr = Tumblr.createClient({
consumer_key: '...',
consumer_secret: '...',
token: '...',
token_secret: '...'
});
@toofusan
toofusan / navitime-train-search.coffee
Created Oct 23, 2016
Navitimeをスクレイピングして電車時刻検索を行う
View navitime-train-search.coffee
# ---------------------
# Description
# ---------------------
# hubot用の電車時刻検索スクリプト(Navitimeをスクレイピング)
# 'train 銀座 渋谷 1730' -> 銀座を出て17:30に渋谷に到着する電車を検索
# 'train now 銀座 渋谷' -> いまから銀座を出て渋谷に到着する電車を検索
module.exports = (robot) ->
# 到着時刻を指定して電車検索
@toofusan
toofusan / referer.js
Created Oct 8, 2016
Webサイト内で「あるURLにどのURLからリンクしているか」抽出する
View referer.js
"use strict";
const client = require("cheerio-httpcli");
const URL = require("url");
const fs = require("fs");
// 共通変数
const MAX_LEVEL = 5; // 最大遷移回数
// URL
if (!process.argv[2]) console.log("No argument");