Skip to content

Instantly share code, notes, and snippets.

View gamame's full-sized avatar

Yusuke Hikime gamame

View GitHub Profile

rbenvとruby-buildでRuby環境を最新に保つのんなー

更新日:2014/2/25

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@gamame
gamame / 0_reuse_code.js
Created January 20, 2014 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gamame
gamame / boto_mpupload_1
Created April 2, 2012 10:44 — forked from garnaat/boto_mpupload_1
An IPython transcript showing use of S3 MultiPart Upload in boto
In [1]: import boto
In [2]: c = boto.connect_s3()
In [3]: b = c.lookup('test-1245812163')
In [4]: mp = b.initiate_multipart_upload('testmpupload2')
In [5]: mp
Out[5]: <MultiPartUpload testmpupload2>
@gamame
gamame / s3_multipart_upload.py
Created March 29, 2012 13:46 — forked from chrishamant/s3_multipart_upload.py
Example of Parallelized Multipart upload using boto
#!/usr/bin/env python
"""Split large file into multiple pieces for upload to S3.
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux
box images we need to use boto's multipart file support.
This parallelizes the task over available cores using multiprocessing.
Usage:
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>]