This file contains hidden or 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
def bundle_ami(): | |
require('dev_aws_userid') | |
require('dev_aws_access_key_id') | |
require('dev_aws_secret_access_key') | |
require('ami_bucket') | |
require('config_folder') | |
require('hudson_slave_ami_name') | |
env.ami_name = env.hudson_slave_ami_name |
This file contains hidden or 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
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |
This file contains hidden or 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
cd ~ | |
sudo apt-get update | |
sudo apt-get install unzip curl python-software-properties -y | |
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
sudo add-apt-repository ppa:ferramroberto/java | |
sudo apt-get update | |
sudo apt-get install sun-java6-jre sun-java6-plugin -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz |
This file contains hidden or 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
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 |
This file contains hidden or 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
""" | |
The MIT License (MIT) | |
Copyright (c) 2011 Numan Sachwani | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: |
This file contains hidden or 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
# Xapi Base Module | |
# | |
# Description:: Setup the Session and auth for xapi | |
# Author:: Jesse Nelson <[email protected]> | |
# | |
# Copyright:: Copyright (c) 2012, Jesse Nelson | |
# | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); |
This file contains hidden or 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
#curl -i -X POST -H 'Content-Type: application/json' -d '{"params": {"password": "mypassword", "user": "myuser"}, "jsonrpc": "2.0", "method": "user.authenticate"}' http://0.0.0.0/zabbix/api_jsonrpc.php | |
require 'net/http' | |
require 'json' | |
def post | |
host = '0.0.0.0' | |
port = '80' |
This file contains hidden or 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
def check_time_sync | |
require 'net/telnet' | |
time_server = 'time.bora.net' | |
options = { | |
"Host" => time_server, |
This file contains hidden or 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
require 'net/telnet' | |
TIME_SERVER = 'time.bora.net' | |
options = { | |
"Host" => TIME_SERVER, | |
"Telnetmode" => false, | |
"Timeout" => 30, | |
"Port" => "time" | |
} |
This file contains hidden or 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 python | |
# extended date command for *nix / writtern in python | |
# Copyright (c) 2011-2012, Seung-jin Kim, All right reserverd | |
# Twitter: @seungjin | |
import sys | |
import time | |
from time import gmtime, strftime |