This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# quick and dirty thin init script | |
# | |
# path for thin | |
thin = "/home/someuser/.rvm/gems/ruby-1.8.7-p72@global/bin/thin" | |
config = "config/config.ru" | |
# which dir to run from | |
path = "/srv/thisapp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original version: http://blog.tsunanet.net/2010/08/jpmp-javas-poor-mans-profiler.html | |
# Usage: ./jpmp.sh <pid> <num-samples> <sleep-time-between-samples> | |
#!/bin/bash | |
pid=$1 | |
nsamples=$2 | |
sleeptime=$3 | |
for x in $(seq 1 $nsamples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_Inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get install libssl-dev | |
sudo gem install fpm | |
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz | |
tar -zxvf ruby-1.9.2-p180.tar.gz | |
cd ruby-1.9.2-p180 | |
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/installdir) | |
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.ec2.autoscale import AutoScaleConnection | |
from boto.ec2.autoscale import LaunchConfiguration | |
conn_as = AutoScaleConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY) | |
#For a complete list of options see http://boto.cloudhackers.com/ref/ec2.html#boto.ec2.autoscale.launchconfig.LaunchConfiguration | |
lc = LaunchConfiguration(name='my-launch-config-name', image_id='ami-123456', | |
key_name='webserver-access-key', | |
security_groups=['webserver-security-group'], | |
instance_type='t1.micro', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#For a complete list of options see http://boto.cloudhackers.com/ref/ec2.html#boto.ec2.autoscale.policy.ScalingPolicy | |
scalingUpPolicy = ScalingPolicy(name='webserverScaleUpPolicy', | |
adjustment_type='ChangeInCapacity', | |
as_name='webserver-asg', | |
scaling_adjustment=2, | |
cooldown=180) | |
scalingDownPolicy = ScalingPolicy(name='webserverScaleDownPolicy', | |
adjustment_type='ChangeInCapacity', | |
as_name='webserver-asg', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.ec2.elb import ELBConnection | |
from boto.ec2.elb import HealthCheck | |
conn_elb = ELBConnection(AWS_ACCESS_KEY, AWS_SECRET_KEY) | |
#For a complete list of options see http://boto.cloudhackers.com/ref/ec2.html#module-boto.ec2.elb.healthcheck | |
hc = HealthCheck('healthCheck', | |
interval=20, | |
target='HTTP:80/index.html', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'compass' | |
require 'compass/exec' | |
rescue LoadError | |
require 'rubygems' | |
require 'compass' | |
require 'compass/exec' | |
end | |
module Jekyll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kickstart file automatically generated by anaconda. | |
#version=RHEL6 | |
install | |
url --url http://192.168.15.100/mirrors/centos/6.1/os/x86_64/ | |
lang en_US.UTF-8 | |
keyboard us | |
text | |
#skipx | |
network --device eth0 --bootproto dhcp --hostname centos61.test.monzell.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Try to find MySQL. | |
# Once done this will define: | |
# MYSQL_FOUND - If false, do not try to use MySQL. | |
# MYSQL_INCLUDE_DIRS - Where to find mysql.h, etc. | |
# MYSQL_LIBRARIES - The libraries to link against. | |
# MYSQL_VERSION_STRING - Version in a string of MySQL. | |
# | |
# Created by RenatoUtsch based on eAthena implementation. | |
# | |
# Please note that this module only supports Windows and Linux officially, but |
OlderNewer