Skip to content

Instantly share code, notes, and snippets.

View shimizukawa's full-sized avatar

Takayuki SHIMIZUKAWA shimizukawa

View GitHub Profile
@almost
almost / glacier.py
Created August 21, 2012 17:59
Amazon Glacier from Python. There's now a branch for this, see here: https://github.com/almost/boto/tree/glacier
# Thomas Parslow http://almostobsolete.net
# Just a work in progress and adapted to what I need right now.
# It does uploads (via a file-like object that you write to) and
# I've started on downloads. Needs the development version of Boto from Github.
#
# Example:
#
# glacierconn = GlacierConnection(AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY)
# writer = GlacierWriter(glacierconn, GLACIER_VAULT)
# writer.write(somedata)
@voluntas
voluntas / gist:73efe2f36ac1513c02a8
Created August 5, 2012 16:13
レビューのススメ?

レビューのススメ?

typo 死ぬほど多いので突っ込みまってます

バージョン:0.2.3
作者:@voluntas

考え方はコロコロ変わるタイプなのですが、最近はレビューが実はとても大事でとにもかくにもレビューなのでは?と思い始めてきています。

@t2y
t2y / conftest.py
Created July 24, 2012 02:43
simple plugin for shelldoctest with pytest, though this script reports only its result
import pytest
import shelldoctest
# use this if you run only shelldoctest
#def pytest_addoption(parser):
# parser.addoption("--shelldoctest", action="store_true",
# help="run shell-doctest")
#
#def pytest_runtest_setup(item):
# if not isinstance(item, item.Function):
@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
@taichi
taichi / log.md
Last active December 15, 2021 02:12
ログ、その時の為に。
diff -r c9910fd022fc -r 0cc743bd3a6d Doc/library/ssl.rst
--- a/Doc/library/ssl.rst Tue Apr 10 10:59:35 2012 -0400
+++ b/Doc/library/ssl.rst Tue May 29 14:31:16 2012 -0700
@@ -218,14 +218,6 @@
Note that use of this setting requires a valid certificate validation file
also be passed as a value of the ``ca_certs`` parameter.
-.. data:: PROTOCOL_SSLv2
-
- Selects SSL version 2 as the channel encryption protocol.
@finack
finack / application.rb
Created March 17, 2012 06:18
Example Chef Deploy Revision for Rails 3+
app = node[:rails][:app]
rails_base app[:name] do
ruby_ver app[:ruby_ver]
gemset app[:gemset]
end
%w{config log pids cached-copy bundle system}.each do |dir|
directory "#{app[:app_root]}/shared/#{dir}" do
owner app[:deploy_user]
@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):
========================================
In defense of zope libraries 翻訳
========================================
Pyramid が Zope ライブラリを使っていることについての非常に長い defence
----------------------------------------------------------------------
freenode の #pyramid IRC チャンネルで、以下のような質問に私は
うんざりするほど多くの時間を割いてきた。
@grantr
grantr / gist:1105416
Created July 25, 2011 22:31
Chef mysql master/slave recipes
## mysql::master
ruby_block "store_mysql_master_status" do
block do
node.set[:mysql][:master] = true
m = Mysql.new("localhost", "root", node[:mysql][:server_root_password])
m.query("show master status") do |row|
row.each_hash do |h|
node.set[:mysql][:master_file] = h['File']
node.set[:mysql][:master_position] = h['Position']
end