Mac OSX Mountain Lion MongoDB セットアップ

mongodb をいれてみた。

$ brew install mongodb

続きを読む...

tmuxで画面サイズをリセットしてアタッチ

tmuxattach する場合、事前に attach されていた 画面があった場合、その画面サイズに固定されてしまう。

そのため、 attach する前にオプションで detach させるようにする。

zsh で自動 attach するには、 .zshrc にこんな感じで書いてる。

続きを読む...

Tinkerer にソーシャルボタン追加

今時のブログとしては、ソーシャルボタンは追加したい。

参考になる記事がいっぱいあったので、参考にしてやってみた。

続きを読む...

Tinkererでテーマカスタマイズ

Tinkererのテーマをカスタマイズしたいと思った。

カスタマイズといってもそんな大層なことがしたいわけではなく。

デフォルトの “modern5” だと、横幅が狭いと思ったので広くしたかっただけ。 今時のワイド画面が多い中ではもうちょっと広くてもいいでしょう。

続きを読む...

Gruntfileでcoffeescript コンパイル & wsh 利用 !

仕事ではWindowsなので、何か作る場合には wsh を利用すると簡単に作れていい。 でも素の JScript を書くのはめんどくさいし、どうせなら今流行り(?)の coffeescript で 書きたいとか思っちゃう。

そしてさらにそのコンパイルは自動化したくて、なんかいいのないかと探していたら、ナウい方法は Grunt を使用することみたいじゃあないですか。

ナウい Grunt を使用して、フルい wsh を書くってのもなんか変だけど、とりあえずやってみようと いうことでやってみた。

続きを読む...

First Tinkerer

Tinkerer でブログ書く。

今まではgithubでocropressで書いてたけど、やっぱこれからは sphinx でしょ! markdown より reStructuredText でしょ!

で、 bitbucket を使う。

bitbucket では、 github と同じように、 <ユーザー名>.bitbucket.org で 自分のページを持つことが出来る。

リポジトリの作成

bitbucket で、 <ユーザー名>.bitbucket.org というリポジトリを作る。 僕の場合は、 yuyunko.bitbucket.org

続きを読む...

Tinkererのインストール

僕の場合は python3 ではダメだったので、 python2.7.4virtualenv を作成して Tinkerer をインストールした。 python のインストールには pythonz を使用している。

$ pythonz install 2.7.4
$ mkvirtualenv -p /Users/yuyunko/.pythonz/pythons/CPython-2.7.4/bin/python --distribute 2.7.4
$ workon 2.7.4
$ easy_install pip
$ pip install Tinkerer

ブログの作成

bitbucketでgit repositoryを作成したら、それを clone する。

$ git clone ssh://git@bitbucket.org/yuyunko/yuyunko.bitbucket.org.git
$ cd yuyunko.bitbucket.org

clone した後は、 Tinkerer でブログを初期化する。

$ tinker -s

そして、 同ディレクトリに作成された、 conf.py を適当に修正する。

# **************************************************************
# TODO: Edit the lines below
# **************************************************************

# Change this to the name of your blog
project = 'yuyunko blog'

# Change this to the tagline of your blog
tagline = ''

# Change this to the description of your blog
description = 'This is yuyunko\'s blog'

# Change this to your name
author = 'yuyunko'

# Change this to your copyright string
copyright = '1984, ' + author

# Change this to your blog root URL (required for RSS feed)
website = 'http://yuyunko.bitbucket.org/'

# **************************************************************
# More tweaks you can do
# **************************************************************

# Add your Disqus shortname to enable comments powered by Disqus
disqus_shortname = 'yuyunko'

こんな感じ。コメントシステムは Disqus が採用されているので、事前にアカウント作成しておく必要あり。

ブログの作成は以下のコマンドで

$ tinker -p "First Tinkerer"

これで、

.
├── 2013
│   └── 05
│       └── 27
│           ├── first_tinkerer.rst

こんなふうに reST ファイルが出来るので、編集する。

$ vim 2013/05/27/first_tinkerer.rst

編集が終わったら、ビルドする。

$ tinker -b

実に簡単。 確認は index.html をブラウザで開けばおっけー。

問題なければ bitbucketpush

$ git add .
$ git commit -m "initial commit"
$ git push -u origin master