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
aws autoscaling create-auto-scaling-group --auto-scaling-group-name <name-asg> --launch-configuration-name uqbar-lc --max-size 1 --min-size 1 --availability-zones "us-east-1b" --vpc-zone-identifier <subnet-XXXXXXXX> |
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
Create launch configuration - with a spot price requirement single security group, no termination policy | |
aws autoscaling create-launch-configuration --launch-configuration-name <name-lc> --image-id <ami-XXXXXXXX> --instance-type m3.medium --associate-public-ip-address --spot-price .045 --security-groups <security group name> | |
Create launch configuration -- with a spot price requirement, multiple security groups and block device mappings for terminaiton policy | |
aws autoscaling create-launch-configuration --launch-configuration-name test-lc --image-id <ami-xxxxxxxx> --instance-type t1.micro --associate-public-ip-address --spot-price .035 --security-groups {<sg-XXXXXXX>,<sg-XXXXXXX>} --block-device-mapping "[{\"DeviceName\": \"/dev/sda\",\"Ebs\": {\"DeleteOnTermination\": true, \"VolumeSize\": 8, \"VolumeType\": \"standard\"}}]" |
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
aws autoscaling put-scheduled-update-group-action --scheduled-action-name <name-UpDaily> --auto-scaling-group-name <name-asg> --recurrence "45 16 * * *" --min-size 1 --max-size 1 --desired-capacity 1 --start-time 2015-08-16T20:44:00Z |
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
aws autoscaling put-scheduled-update-group-action --scheduled-action-name <name-DownDaily> --auto-scaling-group-name <name-asg> --recurrence "10 22 * * *" --min-size 0 --max-size 0 --desired-capacity 0 --start-time 2015-08-16T20:12:00Z |
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
''' | |
@author Bommarito Consulting, LLC | |
@date 20120622 | |
Identify and, if requested, remove orphaned snapshots from an EC2 account. | |
''' | |
# Imports | |
import boto |
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 | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
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
a solr rpm implementation | |
https://github.com/mentalblock/solr-rpm |
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
Enable screen sharing/VNC | |
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw <password> -restart -agent -privs -all | |
List all groups | |
$ dscl . list /groups | |
List group members |
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
List block devices | |
$ lsblk | |
Read label | |
$ sudo e2label <device name> | |
write label | |
$ sudo e2label <device name> <label> | |
fstab entries to mount by label |
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
list compiled modules | |
$ httpd -l | |
Estimate memory usage per apache process | |
$ ps -lyC httpd --sort:rss | awk '{sum+=$8; ++n} END {print "Tot="sum"("n")";print "Avg="sum"/"n"="sum/n/1024"MB"}' | |
The max value for MaxClients/MaxServers should be set to 80% of memory consumption | |
(i.e. mem per httpd process divided by 80% system memory.) | |
Or, for another version from https://gist.github.com/tbjers/4496984 with slight modifications, try this, |
OlderNewer