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
| /* | |
| Author: Jonathan Lurie - http://me.jonathanlurie.fr | |
| License: MIT | |
| The point of this little gist is to fix the issue of losing | |
| typed arrays when calling the default JSON serilization. | |
| The default mode has for effect to convert typed arrays into | |
| object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be | |
| Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an | |
| object, there is no way to get it back in an automated way! |
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
| # -*- encoding: utf-8 -*- | |
| Gem::Specification.new do |s| | |
| s.name = 'parallel_assets_compiler' | |
| s.version = '0.2.0' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Jørgen Orehøj Erichsen' | |
| s.email = 'joe@erichsen.net' | |
| s.summary = 'Compile assets in parallel' | |
| s.description = 'Compile assets in parallel to speed up deployment' |
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
| # -*- encoding: utf-8 -*- | |
| Gem::Specification.new do |s| | |
| s.name = 'parallel_assets_compiler' | |
| s.version = '0.2.0' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Jørgen Orehøj Erichsen' | |
| s.email = 'joe@erichsen.net' | |
| s.summary = 'Compile assets in parallel' | |
| s.description = 'Compile assets in parallel to speed up deployment' |
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
| # -*- encoding: utf-8 -*- | |
| Gem::Specification.new do |s| | |
| s.name = 'parallel_assets_compiler' | |
| s.version = '0.2.0' | |
| s.platform = Gem::Platform::RUBY | |
| s.author = 'Jorgen Orehoj Erichsen' | |
| s.email = 'joe@erichsen.net' | |
| s.summary = 'Compile assets in parallel' | |
| s.description = 'Compile assets in parallel to speed up deployment' |
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
| # If your workers are inactive for a long period of time, they'll lose | |
| # their MySQL connection. | |
| # | |
| # This hack ensures we re-connect whenever a connection is | |
| # lost. Because, really. why not? | |
| # | |
| # Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar) | |
| # | |
| # From: | |
| # http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/ |
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
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |