iOS : https://app.adjust.com/7lnbai Google Play : https://app.adjust.com/axzwdx
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
sudo yum localinstall -y https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm | |
cat > /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json <<'EOP' | |
{ | |
"agent": { | |
"metrics_collection_interval": 60, | |
"run_as_user": "root" | |
}, | |
"metrics": { | |
"append_dimensions": { |
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
#!/bin/bash | |
#### USE THIS COMMAND TO GET THE DATABASES AND REMOVE mysql, information_schema, performance_schema | |
#### EVEN THOUGH IT SHOULDN'T HURT TO HAVE THEM IN THERE | |
#### mysql -s -e "SHOW DATABASES;" | |
DATABASES=" | |
db_name_1 | |
db_name_2 | |
" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.network "forwarded_port", guest: 6379, host: 6379 | |
config.vm.provider "docker" do |d| |
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
# Script used to quickly get a glance of how many queries since a certain time period were longer than X seconds | |
# Customize these 2 parameters | |
STARTDATE="120413" # 2 Digit Year, 2 Digit Month, 2 Digit Day | |
QUERYTIME=3.0 | |
# Runs the commands and prints out Query_time lines | |
FIRST=`grep -n -m 1 "# Time: $STARTDATE" /var/log/mysql-slow.log | cut -d : -f 1`; TOTAL=`wc -l /var/log/mysql-slow.log | cut -d ' ' -f 1`; tail -n `echo "$TOTAL-$FIRST" | bc` /var/log/mysql-slow.log | grep Query_time | awk -v time="$QUERYTIME" '$3 > time {print; }' |
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
Node Name: dev.spicerackapps.com | |
Environment: _default | |
FQDN: dev.spicerackapps.com | |
IP: 74.86.188.194 | |
Run List: role[base-packages], recipe[nginx-7::v_1_0_2], recipe[php_fpm::v_5_3_3_new], recipe[munin-server] | |
Roles: base-packages | |
Recipes compilers::default, sysstat::default, munin-node::default, vim-enhanced::default, git::default, ssh_known_hosts::default, users::default, sudoers::default, ssl-certs, nginx-7::v_1_0_2, php_fpm::v_5_3_3_new, munin-server | |
Platform: redhat 5.5 | |
Attributes: | |
id: dev.spicerackapps.com |
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
[Fri, 20 May 2011 10:39:28 -0500] INFO: *** Chef 0.10.0 *** | |
[Fri, 20 May 2011 10:39:30 -0500] INFO: Run List is [role[base-packages], recipe[backup-dorkapps::default], role[webserver-bingo], role[app-bingo]] | |
[Fri, 20 May 2011 10:39:30 -0500] INFO: Run List expands to [compilers::default, sysstat::default, munin-node::default, vim-enhanced::default, git::default, ssh_known_hosts::default, users::default, sudoers::default, ssl-certs, backup-dorkapps::default, memcached::ec2, nginx-7, php_fpm] | |
[Fri, 20 May 2011 10:39:30 -0500] INFO: Starting Chef Run for web4.spicerackapps.com | |
[Fri, 20 May 2011 10:39:31 -0500] INFO: Loading cookbooks [backup-dorkapps, compilers, curl-devel, geoip, git, libxml2-devel, memcached, munin-node, mysql-devel, nginx-7, pcre, php_fpm, ssh_known_hosts, ssl-certs, sudoers, sysstat, users, vim-enhanced] | |
[Fri, 20 May 2011 10:39:31 -0500] INFO: Storing updated cookbooks/ssh_known_hosts/recipes/default.rb in the cache. | |
[Fri, 20 May 2011 10:39:34 -0500] ERROR: Running exception handlers | |
[Fri, 2 |
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
ec2-50-18-21-104.us-west-1.compute.amazonaws.com [Thu, 19 May 2011 21:29:30 +0000] INFO: Processing template[/etc/ssh/ssh_known_hosts] action create (ssh_known_hosts::default line 26) | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com [Thu, 19 May 2011 21:29:30 +0000] DEBUG: Signing the request as i-0ca59b48 | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com [Thu, 19 May 2011 21:29:30 +0000] DEBUG: String to sign: 'Method:GET | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com Hashed Path:ST9LEChHtxHxvLkMBWJYo/cpN2k= | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com X-Ops-Content-Hash:2jmj7l5rSw0yVb/vlWAYkK/YBwk= | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com X-Ops-Timestamp:2011-05-19T21:29:30Z | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com X-Ops-UserId:i-0ca59b48' | |
ec2-50-18-21-104.us-west-1.compute.amazonaws.com Header hash: {"X-Ops-Content-Hash"=>"2jmj7l5rSw0yVb/vlWAYkK/YBwk=", "X-Ops-Authorization-1"=>"Rdy89GkeM/xIr9/LRvLsKes9kbIhYHtWzMHuZLV46rnaU44by5GKixAysnig", "X-Ops-Userid"=>"i-0ca59b48", "X-Ops-Sign"=>" |
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
Generated at Wed May 18 20:14:17 +0000 2011 | |
Chef::Mixin::Template::TemplateError: | |
Chef::Mixin::Template::TemplateError (undefined method `[]' for nil:NilClass) on line #3: | |
1: # THIS FILE IS MAINTAINED BY CHEF, DO NOT MODIFY AS IT WILL BE OVERWRITTEN | |
2: <% @nodes.each do |n| -%> | |
3: <%= n['hostname'] %>,<%= n['ipaddress'] %> ssh-rsa <%= n['keys']['ssh']['host_rsa_public'] %> | |
4: <%= n['hostname'] %>,<%= n['ipaddress'] %> ssh-dsa <%= n['keys']['ssh']['host_dsa_public'] %> | |
5: <% end -%> |
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 ruby | |
require 'rubygems' | |
require 'fog' | |
connection = Fog::Compute.new(:provider => "AWS", :region => "us-west-1") | |
current_instance_id = `curl http://169.254.169.254/latest/meta-data/instance-id` | |
current_instance = connection.servers.get(current_instance_id) |
NewerOlder