github.com

As we get ready to upgrade our servers I thought it’d be a good time to upgrade our deployment process. Currently pushing out a new version of GitHub takes...

...upwards of 15 minutes. Ouch. My goal: one minute deploys (excluding server restart time...

makandra dev
juggernaut.rubyforge.org

...plugin for Ruby on Rails aims to revolutionize your Rails app by letting the server initiate a connection and push data to the client. In other words your app can...

...have a real time connection to the server with the advantage of instant updates...

robots.thoughtbot.com

We recently decided our CI server needed an overhaul. I really enjoyed Integrity as a build server, but after trying out Hudson it’s hard to say I want to...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description If you deliver files from a public folder it might...

...content-type "..." Outline How to test file downloads with tests that need javascript. Public served Look at the link of the url and check if this file exists in your...

...request. This way code changes take effect immediately, without requiring you to restart the server. If you have been working with Rails for a while, you might even have forgotten...

...themselves from disk. Production All files are loaded in a deterministic order once the server boots. Take this example with some constants referencing each other: # app/models/contract/document/uploader.rb class Contract::Document::Uploader...

...that can be both leaves and containers of other items has_ancestry on the server side Things I learned: Be ready to write a lot of CSS. You need to...

When talking to your MySQL server via a mysql shell, you can terminate queries by ; or \G -- the latter gives you a vertical output. You know this: mysql> SELECT * FROM...

...the bucket as private and fetch the appropriate files from S3 to your application server and stream them to the client finally. While this is possible, I'd recommend to...

...your_model.document.expiring_url => "http://s3-eu-west-1.amazonaws.com/your-bucket/files/foo/bar/123/456/ab/cd/1/2/3/original/Attachment.pdf?AWSAccessKeyId=ABSJASHJK232JAHBS&Signature=V6aJhal2kaB4bxKal23lSMV%2F9w%3D&Expires=1347889426" The expiring_url method carries out a web service call to S3 to gain the data for AWSAccessKeyId and Signature being used within the URL...

If freshclam updates are failing even though the update servers are available and you find error messages like the following in the log you may have outdated or wrong data...

makandra dev
select2.org

...format and extend the input with ajax options. You should paginate your results on server side to reduce the load. Select2 supports an "infinite scroll" feature, which will be enabled...

...utilize the respective hostnames of you machines. For example, if you have 8 application servers (e.g. app1.example.com, app2.example.com, ...) and want to enable NewRelic on app1 and app2 only, utilize those...

...to remove an element from it, after you've successfully deleted it from the server. The README suggests to say something like $scope.users = _.without($scope.users, user). While that works at...

This tool is used on our application servers (and called when deploying) but it also works locally. Just call dumple development from your project directory to dump your database.

We have often felt the pain where our models need to serve too many masters. E.g. we are adding a lot of logic and callbacks for a particular form screen...

linuxsa.org.au

...up little more than one extra line in the output of ps. On a server I want to get informed if there are zombie processes and track them with a...

...two choices, fix it or kill it. In this case it's no critical service and I can just restart it...

...your SOAP talk. In my case my tests had to talk to the same service the staging servers talk to, so any recorded results would contain some random other data...

...bundle install or gem install. Also see: When upgrading/downgrading RubyGems and Bundler on a server, you must clear bundled gems

...IP. Also manually set its DNS setting so it uses Google public DNS. This serves on the IP 8.8.8.8. On the restarted Ubuntu, connect to the internet with UMTS. Also...

...DETAIL: There is 1 other session using the database. This could be the rails server, rubymine and many more. Beside terminating the session connection manually you can also find out...

Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the site you're about to test is placed behind a...

sudo apt-get install nginx Define your nginx config, e.g. at /etc/nginx/conf.d/reverse-proxy.conf: server { listen 127.0.0.1; location /foo/ { proxy_pass https://www.example.com/; } } Reload your config (if it fails...

...run sudo nginx -t to debug) sudo service nginx reload Done. Visit http://localhost/foo/ and you'll see results of https://www.example.com/. Note that nginx handles HTTPS out of...

...look like this: # Begin Whenever generated tasks for: project100 MAILTO="log@example.com" MAILFROM="cron@example.com" # When server is booting up, ensure Sidekiq is running @reboot start_sidekiq 23 8 * * * baz 30 * * * * plop...

describe '#crawl_messages' do it 'should process messages in batches so the server stays alive' do message = stub message.should_receive(:crawl) Message.should_receive(:find_in_batches).and_yield...

Better do: mysqldump -uroot -p database -r utf8.dump Note that when your MySQL server is not set to UTF-8 you need to do mysqldump --default-character-set=latin1...