Skip to content

Instantly share code, notes, and snippets.

Yusuke Yokozawa yokozawa

View GitHub Profile
View my-db.dig
host: 'localhost'
user: 'me'
password: 'my-pass'
database: 'my-database'
project_id: 'my-projectid'
dataset: 'my-dataset'
View idmap
github: yokozawa
esa: yokozawa
slack: yokozawa
View rakefile.rb
require 'esa'
require 'json'
require 'pry'
desc ''
task :default do
client =
access_token: "<your access token>",
current_team: '<your team name>'
View travisci-to-slackpost.php
$url = "[webhookurl]";
header('Content-type: application/json; charset=utf-8');
function create_message($payload) {
$build_url = "" . $payload['repository']['owner_name']
. "/" . $payload['repository']['name'] . "/builds/" . $payload['id'];
$commit_url = $payload['repository']['url'] . "/commit/" . $payload['commit'];
$compare_url = $payload['compare_url'];
View mecab.rb
require 'natto'
require 'csv'
if ARGV[0].nil?
p "usage: ruby mecab.rb [filename]"
words_by_line = {}[0], 'r') do |lines|
yokozawa / file_up.rb
Created Mar 4, 2016
file upload .rb to aws::s3
View file_up.rb
require 'aws-sdk'
require 'date'
p "start:#{}"
region: "ap-northeast-1",
credentials:"your-aws-key", "your-aws-secret")
s3 =
View twitter_bot.php
// twitter setting
$consumer_key = "YOUR CONSUMER KEY";
$consumer_secret = "YOUR CONSUMER SECRET";
$access_token = "ACCESS TOKEN";
$access_token_secret = "ACCESS TOKEN SECRET";
View chatwork_api.php
header('Content-type: application/json; charset=utf-8');
$api_token = "your chatwork api token";
$room_id = "your target room id";
$url = "$room_id/messages";
// committer name(on github) => chatwork id
$members = array(
'yokozawa' => '111111',
You can’t perform that action at this time.