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 bash | |
| ## | |
| # Postgres replication delay check. | |
| # | |
| # @author Jay Taylor [@jtaylor] | |
| # | |
| # @date 2013-07-08 | |
| # |
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 bash | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # @date 2013-08-15 | |
| # | |
| # @description CloudFlare management script. | |
| # | |
| # Path ENV VAR override. |
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
| $ brew doctor | |
| Warning: Your file-system on / appears to be CaSe SeNsItIvE. | |
| Homebrew is less tested with that - don't worry but please report issues. | |
| $ brew --config | |
| HOMEBREW_VERSION: 0.9.4 | |
| ORIGIN: https://github.com/mxcl/homebrew.git | |
| HEAD: cb9317eb03f54b1951c5c13d9e6096a36a871fef | |
| HOMEBREW_PREFIX: /usr/local |
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 bash | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # | |
| # @date 2013-09-03 | |
| # | |
| # Ubuntu SSH system keys migration utility. | |
| # | |
| # Used to clone system-wide SSH keys located at /etc/ssh, ~/.ssh, and /root/.ssh from one host to another. This makes |
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
| # | |
| # Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements. | |
| # | |
| # Originally found on SO: http://stackoverflow.com/questions/601543/command-line-command-to-auto-kill-a-command-after-a-certain-amount-of-time | |
| # | |
| function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } | |
| ## Example usage: | |
| # |
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
| console none | |
| start on (local-filesystems and net-device-up IFACE!=lo) | |
| stop on [!12345] | |
| exec start-stop-daemon --start --user postgres --exec /usr/bin/repmgrd -- -f /etc/repmgr.conf --verbose |
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 bash | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # | |
| # @date 2013-10-02 | |
| # | |
| # Postgres log file compressor which compresses and uploads files to s3 before deleting them. | |
| # This script must be located in the same directory as the log files. | |
| # |
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 bash | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # | |
| # @date 2013-10-02 | |
| # | |
| # Postgres database dump, compress and upload to s3. | |
| # | |
| # Make sure this script runs from a directory with enough space to hold and compress the db dump. |
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 -*- | |
| """LogicalShard model.""" | |
| __author__ = 'Jay Taylor [@jtaylor]' | |
| from django.db.models import ( | |
| CharField, | |
| DateTimeField, | |
| IntegerField, |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct t_operation { | |
| char operand; | |
| int n; | |
| struct t_operation* next; | |
| } t_operation; | |
| int opCost(t_operation* op) { |