View my-db.dig
_export: | |
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 = Esa::Client.new( | |
access_token: "<your access token>", | |
current_team: '<your team name>' |
View travisci-to-slackpost.php
<?php | |
date_default_timezone_set('Asia/Tokyo'); | |
$url = "[webhookurl]"; | |
header('Content-type: application/json; charset=utf-8'); | |
function create_message($payload) { | |
$build_url = "https://magnum.travis-ci.com/" . $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]" | |
exit | |
end | |
words_by_line = {} | |
CSV.open(ARGV[0], 'r') do |lines| |
View file_up.rb
require 'aws-sdk' | |
require 'date' | |
p "start:#{Time.now.to_s}" | |
Aws.config.update({ | |
region: "ap-northeast-1", | |
credentials: Aws::Credentials.new("your-aws-key", "your-aws-secret") | |
}) | |
s3 = Aws::S3::Resource.new |
View twitter_bot.php
<?php | |
date_default_timezone_set('Asia/Tokyo'); | |
// twitter setting | |
require_once('twitteroauth/twitteroauth/twitteroauth.php'); | |
$consumer_key = "YOUR CONSUMER KEY"; | |
$consumer_secret = "YOUR CONSUMER SECRET"; | |
$access_token = "ACCESS TOKEN"; | |
$access_token_secret = "ACCESS TOKEN SECRET"; |
View chatwork_api.php
<?php | |
header('Content-type: application/json; charset=utf-8'); | |
$api_token = "your chatwork api token"; | |
$room_id = "your target room id"; | |
$url = "https://api.chatwork.com/v1/rooms/$room_id/messages"; | |
// committer name(on github) => chatwork id | |
$members = array( | |
'yokozawa' => '111111', |