Skip to content

Instantly share code, notes, and snippets.

View shimizukawa's full-sized avatar

Takayuki SHIMIZUKAWA shimizukawa

View GitHub Profile
@shimizukawa
shimizukawa / PIL_build.rst
Last active December 11, 2015 17:28
PIL (Pillow) build procedure

PIL(Pillow) build on Windows (32bit)

If you want to build PIL on Windows, you need to prepare few external libraries. Although some libraries did not provide static library for windows 32/64 bits then you need to build these libraries by your hand too. Also, PIL will load by python at last then you are recommended to use same compiler with python to build libraries.

Target PIL and versions

PIL

1.1.7 for Python 2.4 (or Pillow-1.7.8)

@tk0miya
tk0miya / deploy.rb
Created February 8, 2013 11:06
Setup rbenv and Ruby using capistrano-rbenv. To install them, use "cap deploy:setup" !
# rbenv setting
require 'capistrano-rbenv'
set :rbenv_ruby_version, '1.9.3-p374'
namespace :rbenv do
task :setup_shellenv do
set :default_environment, {
'RBENV_ROOT' => "#{rbenv_path}",
'PATH' => "#{rbenv_path}/shims:#{rbenv_path}/bin:$PATH"
@knzm
knzm / gist:5326271
Last active December 15, 2015 21:29
Sphinx で生成した HTML に改ページを埋め込む方法
  1. conf.py に以下の設定を追加する

    html_theme_options = {
        'nosidebar': True,
    }
  2. ドキュメントの先頭に以下の内容を書く
reST のいけてないところ。
=========================
普段書くテキストと同じような感じで書いていけるのが reST のいいところなんだけど、
ちょっとした時にインデントで文句を言われることがあるよね。
(例えば、こんなふうに括弧付きで補足を入れたりするときに、
括弧の中で改行したあと、一文字インデントしたくならないかしら...)
@shibukawa
shibukawa / sphinx-tutor.rst
Last active December 19, 2015 16:58
Sphinx-Users.jpのアイディア

Sphinx-Usersjp公認インストラクタ(仮称)

目的

Sphinxを教えられる人を増やす。教えたい人に「自信を持って教えていいよ」と背中を押す制度。オフでのSphinxとの接触機会を増やす。

名前候補

cookbook 'build-essential'
cookbook 'openssl'
cookbook 'mysql',
:git => 'https://github.com/9minutesnooze/mysql.git',
:branch => 'mysql56'
@aodag
aodag / views.py
Created February 4, 2012 11:05
pyramid deform fileupload sample
import colander as c
import deform.widget as w
from deform.form import Form
from deform.schema import FileData
import os
here = os.path.dirname(__file__)
class Store(dict):
def preview_url(self, name):
@shirou
shirou / README
Last active November 22, 2016 03:36
add these lines to conf.py
How to write
1. pip install sphinxjp.themecore
2. pip install <なにか新しいtinkererのテーマ> 例: sphinxjp.themes.newtinker
3. 'sphinxjp.themecore' をextentionsに追加する
例: extensions = ['tinkerer.ext.blog', 'tinkerer.ext.disqus', 'sphinxjp.themecore']
4. html_theme = "<なにか新しいtinkererのテーマ>" と書く
5. ヽ(゚∀゚ヽ 三 ノ゚∀゚)ノ ワーイ
@ianlewis
ianlewis / rest2html.py
Last active December 14, 2016 00:31
Redmine restructured text formatter.
u"""
sudo pip install docutils pygments # システム Python に docutils インストール
rvm use 1.8.7
gem install RbST
/var/www/vhosts/redmine/script/plugin install git://github.com/alphabetum/redmine_restructuredtext_formatter.git
RbST はなんと! 日本語に対応しません! orz (幸いなことに、 docutils の部分は Python で書かれている)
@wutali
wutali / fabric.rb
Created July 10, 2012 12:30
Vagrant provisioner of Fabric.
module Vagrant
module Provisioners
class Fabric < Base
class Config < Vagrant::Config::Base
attr_accessor :fabfile_path
attr_accessor :fabric_path
attr_accessor :python_path
attr_writer :tasks
def _default_fabfile_path