Skip to content

Instantly share code, notes, and snippets.

@jdevera
jdevera / ecs.py
Created February 26, 2010 16:24
A replacement for pyaws's ecs.py to make it work with signed requests.
# Author: Kun Xi <kunxi@kunxi.org>
# License: Python Software Foundation License
#
# Note: This version, 0.3.1, supports the signed requests required
# by Amazon.
# The changes over 0.3.0 are based on a patch for 0.2.0 found here:
# http://blog.umlungu.co.uk/blog/2009/jul/12/pyaws-adding-request-authentication
# To make it work, just download pyaws from http://trac2.assembla.com/pyaws
# and replace the ecs.py file with this one.
@peplin
peplin / recipe.rb
Created July 10, 2010 01:30
S3 File Resource for Chef
# Source accepts the protocol s3:// with the host as the bucket
# access_key_id and secret_access_key are just that
s3_file "/var/bulk/the_file.tar.gz" do
source "s3://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
mode 0644
end
class Comparison
@@window = 64
@@prelude = 12
def self.window
@@window
end
def self.window=(val)
@@window = val
@casualjim
casualjim / recipe.rb
Created October 5, 2011 09:37 — forked from rberger/recipe.rb
S3 File Resource for Chef
# Source accepts the protocol region:// with the host as the bucket
# access_key_id and secret_access_key are just that
# for the eu-west-1 region:
s3_file "/var/bulk/the_file.tar.gz" do
source "s3-eu-west-1://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
@j5ik2o
j5ik2o / gist:1520836
Last active January 3, 2017 17:09
Scalaで使えそうなWeb系フレームワーク&ライブラリ
@wr0ngway
wr0ngway / backup_sdb.rb
Created March 20, 2012 20:25
script to backup all simpledb tables from a given aws account
#!/usr/bin/env ruby
# Add your gems here
#
gemfile_contents = <<-EOF
source "http://rubygems.org"
gem "fog"
gem "yajl-ruby"
EOF
@j5ik2o
j5ik2o / gist:2156447
Created March 22, 2012 05:41
Play framework 2.0でデーモン化する方法

commons-daemonの依存関係を追加する

次のようにproject/Build.scala を編集する。

object ApplicationBuild extends Build {
    // ...
    val appDependencies = Seq(
      "commons-daemon" % "commons-daemon" % "1.0.10"
    )

// ...

@takungsk
takungsk / tmux_cheat_cheet.markdown
Last active April 7, 2019 18:21
tmuxのcheat sheet(日本語)

tmux cheat sheet

コマンド

新しく開始:

tmux

セッションに名前を付けて開始:

tmux new -s myname

アタッチ:

tmux a # (or at, or attach)

再アタッチ:

tumx a -d

@xuwei-k
xuwei-k / not_tailrec.scala
Created June 26, 2012 16:32 — forked from j5ik2o/gist:2996293
リトライハンドラーの殴り書き
object RetryUtil {
case class RetryException(throwables: List[Throwable]) extends Exception
def retry[T](retryLimit: Int, retryInterval: Int, shouldCatch: Throwable => Boolean)(f: => T): T = {
// @annotation.tailrec
def _retry( errors: List[Throwable], f: => T):T = {
try {
f
} catch {
@tomohisa
tomohisa / NSArray+IndexHelper.h
Created July 8, 2012 06:53
Using ObjectAtIndex safely with this method.
//
// NSArray+IndexHelper.h
// C_POS
//
// Created by Tomohisa Takaoka on 6/14/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>