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
| # -*- coding:utf-8 -*- | |
| ''' | |
| Simplistic script to parse the detailed AWS billing CSV file. | |
| Script displays cost of S3 operations broken down per region, bucket and usage | |
| type (either storage or network). It also sums up the amount of storage used per bucket. | |
| Output is filtered wrt to costs < 1$. | |
| See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html for | |
| how to set up programmatic access to your billing. |
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 | |
| # -*- coding: utf-8 -*- | |
| def archive_to_bytes(archive): | |
| def to_seconds(s): | |
| SECONDS_IN_A = { | |
| 's': 1, | |
| 'm': 1 * 60, | |
| 'h': 1 * 60 * 60, |
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
| # This is an example of the Stack Exchange Tier 1 HAProxy config | |
| # The only things that have been changed from what we are running are: | |
| # 1. User names have been removed | |
| # 2. All Passwords have been remove | |
| # 3. IPs have been changed to use the example/documentation ranges | |
| # 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
| userlist stats-auth | |
| group admin users $admin_user | |
| user $admin_user insecure-password $some_password |
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 | |
| if [[ "$#" < "2" || "$#" > "3" ]]; then | |
| cat <<END | |
| Glusterfs GFID resolver -- turns a GFID into a real file path | |
| Usage: $0 <brick-path> <gfid> [-q] | |
| <brick-path> : the path to your glusterfs brick (required) | |
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
| diff -udpr src/subshell.c.orig src/subshell.c | |
| --- src/subshell.c.orig 2013-08-02 18:02:39.000000000 +0300 | |
| +++ src/subshell.c 2013-10-28 10:47:34.000000000 +0200 | |
| @@ -769,7 +769,7 @@ init_subshell (void) | |
| { | |
| /* This must be remembered across calls to init_subshell() */ | |
| static char pty_name[BUF_SMALL]; | |
| - char precmd[BUF_SMALL]; | |
| + char precmd[BUF_MEDIUM]; |
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/sh | |
| # | |
| # About | |
| # ----- | |
| # This script sends simple system-metrics to a remote graphite server. | |
| # | |
| # | |
| # Metrics | |
| # ------- | |
| # The metrics currently include the obvious things such as: |
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 | |
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Ubuntu 11.10 Oneiric Ocelot | |
| # Forked from https://gist.github.com/1287170 | |
| # Modified to use NGinx + uwsgi instead of Apache, as well as memcached and supervisord, incorporating ideas from | |
| # http://blog.adku.com/2011/10/scalable-realtime-stats-with-graphite.html |
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
| rds-modify-db-parameter-group {param-group-name} \ | |
| --parameters="name=character_set_server, value=utf8, method=pending-reboot" \ | |
| --parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \ | |
| --parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
| --parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
| --parameters="name=query_cache_type, value=1, method=pending-reboot" \ | |
| --parameters="name=query_cache_size, value={DBInstanceClassMemory/32}, method=pending-reboot" \ | |
| --parameters="name=table_open_cache, value=2500, method=pending-reboot" \ | |
| --parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \ | |
| --parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \ |
NewerOlder