Skip to content

Instantly share code, notes, and snippets.

ken kkurahar

  • Tokyo, Japan
Block or report user

Report or block kkurahar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kkurahar
kkurahar / aws_cloudformation.coffee
Last active Jan 1, 2016
HipChat + Hubot + CloudFormationで環境構築の自動化
View aws_cloudformation.coffee
# Dependencies:
# "aws2js": "0.6.12"
# "underscore": "1.3.3"
#
# Configuration:
# HUBOT_AWS_ACCESS_KEY_ID
# HUBOT_AWS_SECRET_ACCESS_KEY
# HUBOT_AWS_REGIONS
# HUBOT_AWS_KEYNAME
# HUBOT_AWS_HOSTZONE
View ec2.php
<?php
return array(
'ssh_key' => 'your_keypair_file', // /path/to/key.pem
'ec2_host' => 'your_ec2_ipaddress', // 54.251.xx.xx
'ec2_user' => 'your_ec2_user', // ec2-user
}
@kkurahar
kkurahar / bot
Last active May 24, 2016
Hubotの自動更新用スクリプト。 foreverの自動起動機能を利用して利用する想定。 $ /path/to/hubot/bin/bot start
View bot
#!/bin/sh
export PATH="node_modules/.bin:node_modules/hubot/node_modules/.bin:$PATH"
##export HUBOT_LOG_LEVEL="debug"
## HipChat
export HUBOT_HIPCHAT_TOKEN=""
export HUBOT_HIPCHAT_JID=""
export HUBOT_HIPCHAT_PASSWORD=""
##export HUBOT_HIPCHAT_ROOMS=""
View client.php
<?php
// Include the SDK using the Composer autoloader
require_once(APPPATH . "vendor/aws-2.0/autoload.php");
// Include the Mail_MIME
require_once("Mail/mime.php");
use Aws\Common\Aws;
use Aws\Common\Enum\Region;
use Aws\Ses\Exception\SesException;
@kkurahar
kkurahar / default.rb
Created May 14, 2013
chef recipe for `Jenkins` platforms are supported: `Amazon Linux` [Jenkinsをインストールして 、http 8080で接続確認するところまでのレシピです。]
View default.rb
#
# Cookbook Name:: jenkins
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
repo_url = 'http://pkg.jenkins-ci.org/redhat/jenkins.repo'
@kkurahar
kkurahar / app.js
Last active Oct 11, 2016
Node.js + Express(Jade) + MongoDB(mongose + connect-mongo) でログイン認証機能を実装
View app.js
/**
* Module dependencies.
*/
var express = require('express'),
routes = require('./routes'),
http = require('http'),
path = require('path'),
MongoStore = require('connect-mongo')(express);
@kkurahar
kkurahar / td-agent.conf
Created May 9, 2013
td-agnet + fluent-plugin-filter
View td-agent.conf
<source>
type forward
port 24224
bind 0.0.0.0
</source>
## include
include conf.d/*.conf
<match td.nginx.access>
@kkurahar
kkurahar / default.rb
Created May 9, 2013
chef recipe for phpmyadmin. platforms are supported: Amazon Linux.
View default.rb
rpmforge_file = "rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm"
execute 'get rpmforge packege' do
cwd '/tmp'
command "wget http://pkgs.repoforge.org/rpmforge-release/#{ rpmforge_file }"
not_if { ::File.exists?("/tmp/#{ rpmforge_file }") }
end
rpm_package "#{ rpmforge_file }" do
action :install
You can’t perform that action at this time.