A Pen by Dinesh Vasudevan on CodePen.
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
| class NullObject | |
| def method_missing(*args) | |
| self | |
| end | |
| def nil? | |
| true | |
| end | |
| end |
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
| <VirtualHost *:80> | |
| ServerName xxx | |
| ServerAlias xxx | |
| <Proxy balancer://unicornservers> | |
| BalancerMember http://127.0.0.1:5000 | |
| </Proxy> | |
| RewriteEngine On | |
| # Static files are served by Apache rest by Unicorn |
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
| # From https://github.com/marcandre/backports | |
| unless Kernel.method_defined? :define_singleton_method | |
| module Kernel | |
| def define_singleton_method(*args, &block) | |
| class << self | |
| self | |
| end.send(:define_method, *args, &block) | |
| end | |
| end |
Animated Adam Whitcroft's awesome Climacons with CSS. I was inspired by [Forecast.io's] (http://forecast.io/ "forecast.io") animated weather icons, but wanted to achieve the same results without canvas.
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 install openssl | |
| RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.1e rbenv install 2.0.0-p353 |
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
| spec = Gem::Specification.find_by_name("mygem") | |
| yml_file = spec.gem_dir + "/data/test.yml" |
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
| bundle install --without production |
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
| Compute | |
| Amazon Elastic Compute Cloud (EC2) | |
| Amazon Elastic Map Reduce (EMR) | |
| AutoScaling | |
| Amazon Kinesis | |
| Content Delivery | |
| Amazon CloudFront | |
| Database | |
| Amazon Relational Data Service (RDS) | |
| Amazon DynamoDB |
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
| cache: bundler | |
| language: | |
| - ruby | |
| before_install: gem install bundler -v=1.5.1 | |
| install: | |
| - 'bundle install' | |
| rvm: | |
| - 1.9.3 | |
| - 2.0.0 | |
| - 2.1.0 |