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
| # initializers/active_admin.rb | |
| module ActiveAdmin | |
| class OrderClause | |
| alias_method :initialize_old, :initialize | |
| alias_method :valid_old?, :valid? | |
| alias_method :to_sql_old, :to_sql | |
| def initialize(clause) | |
| if clause.class == String | |
| initialize_old(clause) |
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
| Verifying that +katzmopolitan is my Bitcoin username. You can send me #bitcoin here: https://onename.io/katzmopolitan |
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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQENBFRY6TUBCADgzqFSpV15H77BC574fnzYNl7rFEerbyeK1JIwnkCRvssS/S8ZzGNwgYUn | |
| eMZFT3t9euYAzTx0WgHwhdDUZpRPXsYIfzjz44bXPd4yhJtes12twpj4ZD9RBmbDLnnVpPY1 | |
| ZVvk6EICKsy3FuwaQ1t/SxwWJ/w/aVHzTmlvxHuLYsp418Ik+5S+EAg/zB0ME/V89BUNiC/w | |
| tEisE2EZj6JZSXeQrs7YQhZxe5E5HNewBdEvpigvlFUS/Q3aObeFe1lj5M1sGn6Cmrzs8GXy | |
| Q/qWzVuRqjiVy7229Tm2+yARLm87KbbyRWVjdj43ykM1NcDwl/GEau57o6QNuwKUl1KrABEB | |
| AAG0HklseWEgS2F0eiA8aWx5YWthdHpAZ21haWwuY29tPokBMgQQAQgAJgUCVFjpNwYLCQgH | |
| AwIJEFLp7GBMMJSGBBUIAgoDFgIBAhsDAh4BAACvwAf/dv8j/OfJ1IjxQrFvRXv/BxTBZ8UD | |
| 99igTFHM8KuYhK/AluOKQZMR34yUNVyGPvO6Iz3+jDeES8d3PoVOOD8y7VKtqwkooXLjFb4m |
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
| /* | |
| http://www.percona.com/blog/2008/02/04/finding-out-largest-tables-on-mysql-server/ | |
| */ | |
| SELECT CONCAT(table_schema, '.', table_name) , | |
| CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
| CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
| CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
| CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 ), 2), 'M') total_size, | |
| ROUND(index_length / data_length, 2) idxfrac |
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 'aws-sdk-core' | |
| deployments = opsworks.describe_commands(deployment_id: deployment_id) | |
| region = "us-east-1" | |
| opsworks = Aws::OpsWorks::Client.new(region: region) | |
| deployments = opsworks.describe_commands(deployment_id: deployment_id) | |
| deployments[0].collect(&:log_url).compact |
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
| xcode-select --install | |
| bundle config build.nokogiri --use-system-libraries | |
| bundle config build.eventmachine --with-cppflags=-I/usr/local/opt/openssl/include | |
| gem install eventmachine -v '1.0.7' -- --with-cppflags=-I/usr/local/opt/openssl/include |
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
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
OlderNewer