Skip to content

Instantly share code, notes, and snippets.

View gamame's full-sized avatar

Yusuke Hikime gamame

View GitHub Profile
@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>]
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@voluntas
voluntas / django-s3-imagekit-celery.rst
Last active May 13, 2022 13:46
S3 と非同期サムネイル作成 コトハジメ

S3 と非同期サムネイル作成 コトハジメ

更新:2013-12-08
バージョン:0.1.8
作者:@voluntas
URL:http://voluntas.github.io/

概要

@somtd
somtd / SyncEngine.h
Created December 7, 2013 10:01
Synchronize CoreData with Parse
#import <Foundation/Foundation.h>
extern NSString * const kSDSyncEngineDownloadCompleteNotification;
extern NSString * const kSDSyncEngineSyncCompletedNotificationName;
typedef enum {
ObjectSynced = 0,
} ObjectSyncStatus;
//Thanks to
@yono
yono / 0.md
Last active December 26, 2017 08:57
fabric で踏み台サーバ越しに ssh アクセス

前提

  • [local] -> [admin] -> [prod]
  • [admin] -> [prod] の鍵は事前に配置済み
  • $HOME/.ssh/config で設定
  • 踏み台サーバ(admin)、目的のサーバ(prod) どちらにも鍵認証でログイン

結果

  • $HOME/.ssh/config だけだと実行終了時の DONE で固まる
@nashirox
nashirox / rails-validates.rb
Last active September 2, 2024 08:29
Rubyのバリデーション用正規表現集
#
# 数字
#
# 全て数値(全角)
/\A[0-9]+\z/
# 全て数値(半角)
/\A[0-9]+\z/
@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"