Skip to content

Instantly share code, notes, and snippets.

View morika-t's full-sized avatar

Takeshi Morikawa morika-t

  • NTT TechnoCross Corporation
  • Tokyo, Japan
View GitHub Profile
@morika-t
morika-t / s3.rb
Last active August 29, 2015 14:14 — forked from bouzuya/s3.rb
require 'rubygems'
require 'bundler/setup'
require 'aws-sdk'
# NOTE: require ENV[...]
# export AWS_ACCESS_KEY_ID='...'
# export AWS_SECRET_ACCESS_KEY='...'
# export AWS_REGION='ap-northeast-1'
s3 = AWS::S3.new
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@morika-t
morika-t / cf-ssh-try-openssh-for-windows.md
Created October 26, 2014 14:53
cf-ssh-try-openssh-for-windows
Node.jsの環境変数
  • app.set('port', process.env.PORT || 3000)process.envは環境変数といって、node実行時に指定する変数のこと。
  • Consumer_keyなど公開したくないものを隠すのにも使える。
  var some_url=url.format({
    protocol: 'http:',
    port: process.env.DATA_PORT,
 hostname: process.env.DATA_HOST || '×××.×××.×××.×××',
@morika-t
morika-t / howto.md
Created August 27, 2014 10:33 — forked from tuki0918/howto.md

明日からはじめる Git フック


フックスクリプトの種類とサンプル

 

logo

#!/bin/sh
# ########################################################## #
# wrapper for mosh to work with ssh's proxycommand directive #
# this only makes sense if the machine is directly reachable #
# from the internet using udp. #
# ########################################################## #
THISSCRIPT="`basename \"$0\"`"
REMOTE="$1"
function cfenv () {
function curenv () {
if [ "$1" == "" ]; then
CURENV="default"
else
CURENV="$(echo "$1" | cut -d '-' -f 2)"
fi
}
function listenvs () {
echo "Listing available environments..."

 このgistは Cloud Foundry Advent Calendar 2013 の23日目の記事です。今回はかなり軽めに。

 Cloud Controller NG (以下「CCng」) の document_api については,輪読会などでも何度か「壊れていて使えない」と言ってきましたが,この間再度試してみようと思ってREADMEを読んだら,気になる記述が。

API documentation

To genenerate the API documentation

bundle exec rspec spec/api/ --format RspecApiDocumentation::ApiFormatter
open doc/api/index.html
15:39 kumauta: な!ん!だ!よ!