Skip to content

Instantly share code, notes, and snippets.

View takenoko-str's full-sized avatar
🎯
Focusing

takenoko-str takenoko-str

🎯
Focusing
  • 35.07103745548258, 135.29974566562086
View GitHub Profile
@garnaat
garnaat / firstlaunch.py
Created May 18, 2011 12:16
Simple example of creating your first instance in EC2
import boto.ec2
import os, time
# define region_name to be region you want to connect to
region_name = 'eu-west-1'
conn = boto.ec2.connect_to_region(region_name)
# First upload a public key to use for SSH'ing to instance. Use "ssh-keygen" to generate.
fp = open(os.path.expanduser('~/.ssh/mykey.pub'))
material = fp.read()
@seungjin
seungjin / gist:2564765
Created May 1, 2012 03:40
autoscaling with boto
import boto.ec2
from boto.ec2.elb import ELBConnection
from boto.ec2.elb import HealthCheck
from boto.ec2.autoscale import AutoScaleConnection
from boto.ec2.autoscale import LaunchConfiguration
from boto.ec2.autoscale import AutoScalingGroup
from boto.ec2.autoscale import ScalingPolicy
@j5ik2o
j5ik2o / gist:2970973
Last active June 6, 2024 14:24
ペアプロの心得

ペアプロの心得

休憩をとる

1.定期的に休憩をとっていますか? ペアプログラミングは、精神的な体力を消耗します。定期的に休憩をとってリフレッシュすることがとても大切です。

謙虚になる

2.「色々な実装方針がある」という認識がありますか?

@mikeyk
mikeyk / create_status_alarm.py
Created July 25, 2012 18:31
Create a StatusCheckFailed alarm
import boto.ec2.cloudwatch
import sys
import os
AWS_KEY = os.environ.get("AWS_ACCESS_KEY_ID")
AWS_SECRET = os.environ.get("AWS_SECRET_ACCESS_KEY")
AWS_REGION = os.environ.get("AWS_EC2_REGION", "us-east-1")
TOPIC = 'YOUR_TOPIC'
def create_status_alarm(instance_id):
@agnoster
agnoster / README.md
Last active July 13, 2024 19:26
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

概要

Fluentdは JSONストリームとしてログを扱うログ収集デーモンです。
これまでのところ、最大のユーザーではピーク時で
100台以上のサーバ、650GB daily 、70,000msgs/sec のログを収集しています。

目的

@ponkore
ponkore / clojure-reader-macro.md
Created December 3, 2012 15:32
Clojure のリーダーマクロについて (lisp reader macro advent calendar 2012 の記事です)。

Clojure のリーダーマクロについて

この記事は、lispリーダーマクロアドベントカレンダー の4日目の記事です。 タイトルにある通り、Clojure でのリー ダーマクロについて取り扱います(対象とする Clojure のバージョンは 1.4)。

はじめに

@tilfin
tilfin / gist:5004848
Created February 21, 2013 13:50
Daemon program control script example (bash)
#!/bin/bash
prgfile=<Program Script filepath>
pidfile=<PID filepath>
start() {
if [ -f $pidfile ]; then
pid=`cat $pidfile`
kill -0 $pid >& /dev/null
if [ $? -eq 0 ]; then
@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/

概要

@kjoconnor
kjoconnor / delete_snapshots.py
Created November 6, 2013 21:33
boto script to delete snapshots matching a filter and older than X days
import sys
from boto.ec2 import connect_to_region
from datetime import datetime, timedelta
try:
days = int(sys.argv[1])
except IndexError:
days = 7