1. install
brew install tor
brew install privoxy
2. copy and modify config file
1. install
brew install tor
brew install privoxy
2. copy and modify config file
| (function() { | |
| function status(response) { | |
| if (response.ok) { | |
| return response | |
| } else { | |
| var error = new Error(response.statusText || response.status) | |
| error.response = response | |
| throw error | |
| } | |
| } |
| /etc/supervisor/conf.d/sidekiq.conf | |
| [program:sidekiq] | |
| command=/usr/local/bin/sidekiq.sh | |
| directory=/usr/local/bin/ | |
| user=ubuntu | |
| startsecs=10 | |
| autostart=true | |
| autorestart=true | |
| stdout_logfile=/var/log/supervisor/sidekiq.log |
| # NullStorage provider for CarrierWave for use in tests. Doesn't actually | |
| # upload or store files but allows test to pass as if files were stored and | |
| # the use of fixtures. | |
| class NullStorage | |
| attr_reader :uploader | |
| def initialize(uploader) | |
| @uploader = uploader | |
| end |
brew install fish
curl -L https://get.oh-my.fish | fish| class @Facebook | |
| rootElement = null | |
| eventsBound = false | |
| @load: -> | |
| unless $('#fb-root').size() > 0 | |
| initialRoot = $('<div>').attr('id', 'fb-root') | |
| $('body').prepend initialRoot |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
| #!/usr/bin/env ruby | |
| # Script to generate random images. Based on http://www.imagemagick.org/Usage/canvas/#random_blur | |
| require 'optparse' | |
| options = {} | |
| optparse = OptionParser.new do |opts| |
| # 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 |