Skip to content

Instantly share code, notes, and snippets.

View utahta's full-sized avatar

Yuta UEKUSA utahta

  • Merpay, Inc.
  • Tokyo, Japan
View GitHub Profile
@utahta
utahta / oauth2_token.go
Created August 16, 2016 11:51
Google OAuth2 Token
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"strings"
"golang.org/x/oauth2"
@utahta
utahta / zundoko.go
Last active May 18, 2016 04:29
ズンドコ with Golang
package main
import (
"fmt"
"math/rand"
"time"
)
const (
zun = "ズン"
@utahta
utahta / playdata.rb
Created November 9, 2014 16:18
maimai play data to json
require 'maimailog'
require 'json'
require 'optparse'
require 'io/console'
opts = {}
opt = OptionParser.new
opt.on('-u USERID', 'maimainet user id') { |v| opts[:u] = v }
opt.on('-p', 'maimainet password') { |v| opts[:p] = v }
opt.parse!(ARGV)
@utahta
utahta / 140326.rb
Created March 27, 2014 09:15
3月 優待
# coding:utf-8
require 'rubygems'
require 'jpstock'
# 取得価額から逆日歩最高料率を計算して、
# 優待額との差をだし、
# お得かどうか判断します
# 逆日歩最高料率の計算
def max_gyakuhibu(price, lot)
m = price * lot
@utahta
utahta / hello.pm6
Last active August 29, 2015 13:57
hello, world x3
my
$X=eval
"\x63\x68\x72
44"
and
my
$Y=eval
"\x63\x68\x72
32"
and
@utahta
utahta / sendmail.vbs
Created June 19, 2013 07:00
VBSメール送信
Set objMail = CreateObject("CDO.Message")
objMail.From = "[email protected]"
objMail.To = "[email protected]"
objMail.Subject = "テスト"
objMail.TextBody = "本文"
strConfigurationField ="http://schemas.microsoft.com/cdo/configuration/"
With objMail.Configuration.Fields
.Item(strConfigurationField & "sendusing") = 2
@utahta
utahta / yutai_130326.rb
Last active December 15, 2015 11:29
3月の優待結果
# coding:utf-8
require 'rubygems'
require 'jpstock'
# 証券コード => [優待に必要な株数, 優待額]
codes = {
'6875' => [100, 3000],
'7291' => [100, 1000],
'7313' => [100, 3000],
'1334' => [1000, 3000],
@utahta
utahta / nginx.conf
Created January 6, 2013 11:01
nginx + php-fpm + reverse proxy
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@utahta
utahta / yutaiincome.rb
Created September 26, 2012 07:44
優待・逆日歩損益計算
# coding:utf-8
require 'rubygems'
require 'jpstock'
# 証券コード => [優待に必要な株数, 優待額]
codes = {
'2131' => [5, 15000],
'4665' => [100, 1000],
'4839' => [1, 2000],
'7291' => [100, 1000],
@utahta
utahta / IncomeResult.vb
Last active October 5, 2015 14:17
岡三RSSで当日の損益を計算するプログラム
' 銘柄コードと銘柄名
Public ccode As Integer
Public name As String
' 損益
Public income As Long
' 信用新規買, 返済売
Public buy_price As Double
Public buy_amount As Long