Skip to content

Instantly share code, notes, and snippets.

View yokohama's full-sized avatar

Yokohama yokohama

View GitHub Profile
@yokohama
yokohama / a.rb
Created September 28, 2012 08:03
固定の文字をtwitterにつぶやいてみる
#
# 固定の文字をtwitterに、つぶやいてみるサンプルコード
#
require 'rubygems'
require 'twitter'
require 'pp'
Twitter.configure do |config|
config.consumer_key = 'Consumer Key'
config.consumer_secret = 'Consumer secret'
@yokohama
yokohama / b.rb
Created September 28, 2012 08:03
自分のタイムラインを画面に表示させてみる
#
# 自分のタイムラインの内容をとってきて表示させてみるサンプルコード
#
require 'rubygems'
require 'twitter'
require 'pp'
Twitter.configure do |config|
config.consumer_key = 'Consumer Key'
config.consumer_secret = 'Consumer secret'
@yokohama
yokohama / c.rb
Created September 28, 2012 08:04
任意の文字列ををTwitterに投稿してみる
#
# 任意の文字列を受け付けて、内容をTwitterに投稿する。
# 任意の文字列はコンソールから入力。
#
require 'rubygems'
require 'twitter'
require 'pp'
Twitter.configure do |config|
config.consumer_key = 'Consumer Key'
@yokohama
yokohama / .vimrc
Created September 28, 2012 08:12
.vimrc
set nocompatible
set number
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
syntax on
filetype on
filetype indent on
@yokohama
yokohama / operation.rb
Created January 21, 2013 15:56
コンテンツ運用更新用、簡易CMS。所定のディレクトリに、csvファイルをルールにそって配置すると、ヘルパーからオブジェクトとして使えるようにする。
# コンテンツ更新設定を読み込みオブジェクトとして提供するクラス。
# 更新運用は、下記ルールに従って所定の位置にファイルをセットするだけで、ソースコードの追記やクラスファイルの追記は必要はありません。
#
# <読み込みコンテンツ設定ルール>
# resources/operationに、クラス名に使える名前のcsvファイルを置く。
# ○) Art.csv Pickup.csv WhatsNew.csv
# ×) art.cav pickup.csv whats_new.csv _hoge.cvs 123.csv
# ファイルの拡張子は必ず、.csvです。それ以外は読み込まれません。
#
# <csvファイルの中身のルール>
@yokohama
yokohama / .vimrc
Created April 16, 2013 15:32
neocomplcacheのインストール ref: http://qiita.com/items/e8accfbd4cf0839e793e
NeoBundle 'Shougo/neobundle.vim'
".vim/bundle/neocomplcache/doc/neocomplcache.txt
"から、必須設定と書かれている部分をコピペ
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplcache.
let g:neocomplcache_enable_at_startup = 1
" Use smartcase.
let g:neocomplcache_enable_smart_case = 1
@yokohama
yokohama / file0.txt
Created February 17, 2017 04:59
RedHat7にPHP7のインストール ref: http://qiita.com/yokohama/items/c3f514a703a3660f633f
$ uname -a
Linux xxx.compute.internal 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
@yokohama
yokohama / file0.txt
Last active February 17, 2017 06:52
RedHat7にmariadbのインストール ref: http://qiita.com/yokohama/items/e961a86602d2df3bc0a2
# yum install mariadb mariadb-server
# vi /etc/php-fpm.d/www.conf
@yokohama
yokohama / file0.txt
Last active February 17, 2017 07:41
Redhat7にnginxのインストールとバーチャルホストの設定 ref: http://qiita.com/yokohama/items/7286753710fdb1d275bc
# yum install nginx
# nginx -v
nginx version: nginx/1.10.2