Skip to content

Instantly share code, notes, and snippets.

View ysaotome's full-sized avatar

Yuichi Saotome ysaotome

View GitHub Profile
@ysaotome
ysaotome / .screenrc
Last active September 27, 2015 21:38
.zshrc & .scrrnrc Public Settings
defencoding utf-8
#encoding utf-8 utf-8
escape ^z^z
#cjkwidth on
vbell off
defhstatus I^En:^EtI
shell -$SHELL
autodetach on
@ysaotome
ysaotome / centos56_setup_script_for_niftycloud.sh
Created December 29, 2011 10:28
ニフティクラウド(NiftyCloud)向け初期セットアップスクリプト CentOS 5.6 64bit Plain setup script for NiftyCloud
#!/bin/bash
# CentOS 5.6 64bit Plain setup script for NiftyCloud
# 2012/03/16 @ysaotome
#===============================================
# Settings
#===============================================
##rootのパスワード
ROOT_PASSWORD='hoge##123'
##追加する管理ユーザ名
@ysaotome
ysaotome / wordpress_automatic_install_script_for_niftycloud_centos56.sh
Created January 1, 2012 01:29
ニフティクラウド(NiftyCloud)向けWordpress自動セットアップスクリプト for CentOS 5.6 64bit Plain
#!/bin/bash
# Wordpress Automatic Install Script for NiftyCloud(CentOS 5.6 64bit Plain)
# 2012/01/01 @ysaotome
#===============================================
# Wordpress Settings
#===============================================
##MySQL管理ユーザのパスワード
MYSQL_ROOT_PASS='mysql##123'
##Wordpressデータベース名
@ysaotome
ysaotome / wget_api_client_for_niftycloud.sh
Created January 2, 2012 23:37
ニフティクラウド(NiftyCloud)のREST APIをshellから叩く
#!/bin/bash
# Wget Api Clinet for NiftyCloud
# 2012/01/03 @ysaotome
#===============================================
# Settings
#===============================================
## 公開鍵
ACCESS_KEY='hoge_accesskey'
## 秘密鍵
@ysaotome
ysaotome / centos60_setup_script_for_niftycloud.sh
Last active October 1, 2015 19:58
ニフティクラウド(NiftyCloud)向け初期セットアップスクリプト CentOS 6.0/6.2 64bit Plain setup script for NiftyCloud
#!/bin/bash
# CentOS 6.0/6.2 64bit Plain setup script for NiftyCloud
# 2012/04/03 @ysaotome
#===============================================
# Settings
#===============================================
##rootのパスワード
ROOT_PASSWORD='hoge##123'
##追加する管理ユーザ名
@ysaotome
ysaotome / wordpress_automatic_install_script_for_niftycloud_centos62.sh
Last active October 2, 2015 11:27
ニフティクラウド(NiftyCloud)向けWordpress自動セットアップスクリプト for CentOS 6.2 64bit Plain
#!/bin/bash
# Wordpress Automatic Install Script for NiftyCloud(CentOS 6.2 64bit Plain)
# 2012/04/03 @ysaotome
#===============================================
# Wordpress Settings
#===============================================
##MySQL管理ユーザのパスワード
MYSQL_ROOT_PASS='mysql##123'
##Wordpressデータベース名
@ysaotome
ysaotome / gitlab_automatic_install_script_for_niftycloud_centos62.sh
Created April 3, 2012 17:13
ニフティクラウド(NiftyCloud)向けGitlab自動セットアップスクリプト for CentOS 6.2 64bit Plain
#!/bin/bash
# Gitlab Automatic Install Script for NiftyCloud(CentOS 6.2 64bit Plain)
# 2012/04/04 @ysaotome
##パッケージのインストール
yum --enablerepo=remi-test,remi,epel,dag -y install apr-devel apr-util-devel byacc db4-devel gcc gcc-c++ gdbm-devel git glibc-devel libcurl-devel libicu-devel libxml2-devel libxslt libxslt-devel libyaml make mysql-devel ncurses-devel openssl-devel pcre-devel python-devel python-setuptools readline-devel redis sqlite-devel tcl-devel lib-devel libtool
/sbin/ldconfig
/sbin/chkconfig redis on
/sbin/service redis start
@ysaotome
ysaotome / niftycloud-fw-visualization.awk
Created May 6, 2012 10:40
generate graphviz dot file for NiftyCloud Firewall map
#!/usr/bin/awk -f
BEGIN {
FS="##";
print "digraph G {";
print "\t\"0.0.0.0/0\" [label = \"インターネット\"];";
}
$7 ~ /CIDR|IP|GRPNAME/ {
src = $8;
}
@ysaotome
ysaotome / facebook-sample-app.php
Last active December 31, 2016 08:09
Facebook連携サンプルプログラム 出来る事 (1)ログイン、ログアウト処理 (2)ログインしている人の情報を取得する処理 (3)ログインしている人の友達リストを取得する処理
<?php
//Facebook公式SDK(開発セット)を読み込む
require './facebook-php-sdk/src/facebook.php';
//AppIDとAppSecretをFacebook Developer Centerにて取得して下さい。
// https://developers.facebook.com/apps/
//AppIDとAppSecretを設定してください。
$facebook = new Facebook(array(
'appId' => 'APP ID',
@ysaotome
ysaotome / CentOS6_rbenv_setup.sh
Created March 20, 2013 09:26
CentOS 6 rbenv setup
yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd /usr/local
git clone git://github.com/sstephenson/rbenv.git rbenv
mkdir rbenv/shims rbenv/versions
chgrp -R groupname rbenv
chmod -R g+rwxXs rbenv
git clone git://github.com/sstephenson/ruby-build.git ruby-build
cd ruby-build
./install.sh