Skip to content

Instantly share code, notes, and snippets.

View vkgtaro's full-sized avatar
😃

Taro Komatsu vkgtaro

😃
View GitHub Profile
@vkgtaro
vkgtaro / notify_to_member.js
Last active March 3, 2017 17:15
お知らせシートを自分なりに書き換えて chatwork 対応してみた
/**
* お知らせシートの messages シートから、お知らせを生成して chatwork に投稿する
*/
var Notifier = function () {
this.config_sheet_name = 'configuration';
this.messages_sheet_name = 'messages';
this.rooms_sheet_name = 'rooms';
this.default_delivery_hour = 10;
this.default_delivery_minute = 0;
@vkgtaro
vkgtaro / gopath.md
Last active February 18, 2017 14:48
go のライブラリ探索パスについて
@vkgtaro
vkgtaro / 3gokushi-TroopTool.user.js
Last active January 20, 2017 01:16 — forked from puyo-sh/3gokushi-TroopTool.user.js
ブラウザ三国志 簡易出兵ツール
// ==UserScript==
// @name 3gokushi-TroopTool
// @namespace https://gist.github.com/vkgtaro/ee208f548590b66019ca1beb3e896a72
// @description ブラウザ三国志 出兵ツール
// @include http://*.3gokushi.jp/*
// @exclude http://info.3gokushi.jp/*
// @version 1.4
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
// @require http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js
@vkgtaro
vkgtaro / amazon-calc.js
Last active September 18, 2017 04:05 — forked from koyopro/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版/TSV に金額が入るように変更版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
// 金額取って出すように変更しました
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
@vkgtaro
vkgtaro / utf8-svn18.diff
Created August 13, 2015 00:51
subversion utf8-mac patch
--- a/subversion/libsvn_subr/path.c
+++ b/subversion/libsvn_subr/path.c
@@ -40,6 +40,9 @@
#include "dirent_uri.h"
+#if defined(DARWIN)
+#include <CoreFoundation/CoreFoundation.h>
+#endif /* DARWIN */
@vkgtaro
vkgtaro / subversion-utf8.diff
Created August 12, 2015 05:39
subversion18-utf8.diff
--- subversion/libsvn_subr/path.c 2015-08-12 13:59:32.000000000 +0900
+++ subversion/libsvn_subr/path.c.new 2015-08-12 13:59:16.000000000 +0900
@@ -40,6 +40,9 @@
#include "dirent_uri.h"
+#if defined(DARWIN)
+#include <CoreFoundation/CoreFoundation.h>
+#endif /* DARWIN */
@vkgtaro
vkgtaro / file0.js
Created April 27, 2015 03:21
ベクトルの角度を求める ref: http://qiita.com/vkgtaro/items/b2cd00f376c427cb9ea6
calculate_cosine = function (x, y) { return x / Math.sqrt(x*x + y*y); };
calculate_radian = function (cos) { return Math.acos(cos) / (Math.PI / 180); };
@vkgtaro
vkgtaro / file0.js
Created April 17, 2015 10:15
cocos2d-js でスプライトを奥に向かってくるくる回す ref: http://qiita.com/vkgtaro/items/3f3fad692765c6383649
this.sprite = new cc.Sprite("/path/to/card.png");
this.sprite.attr({
x: size.width / 2,
y: size.height / 2
});
this.addChild(this.sprite, 0);
orbit = cc.orbitCamera(1.5, 1, 0, 0, 360, 0, 0);
this.sprite.runAction(orbit.repeatForever());
@vkgtaro
vkgtaro / file0.js
Created February 26, 2015 06:43
cocos2d-js のアニメーションを動かす / 反転させる ref: http://qiita.com/vkgtaro/items/f75b60b489803fb205d4
var animation = cc.AnimationCache.getInstance().getAnimation('animation_name');
animation.setRestoreOriginalFrame(true);
var animation_sprite = cc.Sprite.create( image_path, cc.rect(0, 0, width, height) );
animation_sprite.setPosition(220, 240);
layer.addChild(anime_sprite, 300);
animation_sprite.runAction( cc.RepeatForever.create( cc.Animate.create(animation)) );
animation_sprite.runAction( cc.MoveBy.create(10, cc.p(200,100) ) );
@vkgtaro
vkgtaro / file0.js
Last active August 29, 2015 14:15
cocos2d-js でアニメーションを読み込む関数書いた ref: http://qiita.com/vkgtaro/items/e9fa63f0b6a54c7dba50
var animationLoad = function (animation_name, width, height, turn_point, count, delay_time, image_path) {
var x_count = 0;
var y_count = 0;
var frames_array = [];
for (var i = 0; i < count; i++ ) {
var current_x = width * x_count;
var current_y = height * y_count;
var frame = cc.SpriteFrame.create(
image_path,