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
| import sys, getopt | |
| from boto.s3.connection import S3Connection | |
| conn = S3Connection('YOURKEY', 'YOURSIGNATURE') | |
| from boto.s3.key import Key | |
| bucket = conn.get_bucket('proxy-templates') | |
| k = Key(bucket) | |
| k.key = 'web/lighttpd.conf' | |
| k.get_contents_to_filename('lighttpd.conf') |
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
| """ | |
| The portfolio rebalancing bot will buy and sell to maintain a | |
| constant asset allocation ratio of exactly 50/50 = fiat/BTC | |
| """ | |
| import strategy | |
| DISTANCE = 7 # percent price distance of next rebalancing orders | |
| FIAT_COLD = 0 # Amount of Fiat stored at home but included in calculations | |
| COIN_COLD = 0 # Amount of Coin stored at home but included in calculations |
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
| <?php | |
| include 'aws.phar'; | |
| use Aws\CloudFormation\CloudFormationClient; | |
| $client = CloudFormationClient::factory(array( | |
| 'region' => 'ap-southeast-2', | |
| 'key' => '__redacted__', | |
| 'secret' => '__redacted __', | |
| 'curl.options' => array( |
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
| - name: Ensure packages are installed | |
| apt: pkg={{ item }} state=present | |
| with_items: | |
| - git | |
| - python-keyczar | |
| - php5-cli | |
| - php5-sqlite | |
| - php5-json | |
| - php5-mcrypt | |
| - php-gettext |
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
| - name: Installing composer.phar | |
| shell: chdir=/app/bin creates=/app/bin/composer.phar php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" |
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
| - name: Check for pt_BR locale | |
| shell: grep pt_BR /var/lib/locales/supported.d/local | |
| register: locale_pt_BR | |
| ignore_errors: true | |
| changed_when: false | |
| - name: Create pt_BR locale | |
| shell: locale-gen pt_BR.UTF-8 | |
| when: locale_pt_BR.rc == 1 |
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
| - name: Composer install | |
| shell: chdir=/app/web creates=/app/web/composer.lock /app/bin/composer.phar install | |
| async: 600 | |
| poll: 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
| #!/usr/bin/env python | |
| # USAGE: | |
| # Save this as: library/find_ami | |
| # inside your ansible project folder | |
| # | |
| # chmod +x library/find_ami | |
| # | |
| # Playbook task: | |
| # - find_ami: |
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
| { | |
| "host": "staging.REDACTED", | |
| "x-amz-cf-id": "TeSvfNKhljGl5v1Nldr0ApgX0LbmW25-sfTbOvU-kfSxjBAszhQNOQ==", | |
| "connection": "Keep-Alive", | |
| "user-agent": "curl/7.47.0", | |
| "via": "1.1 74b217f6de96253e0ed5551fd50bc165.cloudfront.net (CloudFront)", | |
| "x-forwarded-for": "52.62.49.205", | |
| "cloudfront-is-mobile-viewer": "false", | |
| "cloudfront-is-tablet-viewer": "false", | |
| "cloudfront-is-smarttv-viewer": "false", |
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
| pragma solidity ^0.4.11; | |
| /** | |
| * @title Ownable | |
| * @dev The Ownable contract has an owner address, and provides basic authorization control | |
| * functions, this simplifies the implementation of "user permissions". | |
| */ | |
| contract Ownable { | |
| address public owner; |
OlderNewer