revisions << capture(:cat, 'REVISION').strip end end # Never skip asset compile when servers are running on different code next if revisions.uniq.length > 1 changed_files = `git diff --name-only...
Sometimes you want to see what data you get through a TCP or UDP connection. For example, you want to...
Ubuntu lets you mount an SSH shell into Nautilus from Places -> Connect to server (select "SSH" as server type). In order to copy a file over SSH from a shell...
Put the following into config.ru in your Rails root folder: # Require your environment file to bootstrap Rails require ::File.dirname(__FILE...
I ran into a situation in which I received the yarn integrity check warning when starting the rails console even...
Once you start introducing partial updates, you open yourself for caching problems. doing partial updates means all cached copies of...
i keep looking for ways to help people 'get' REST. not URLs or HTTP Methods; but REST itself - in a...
When using RestClient to make an HTTP request, it will raise an exception when receiving a non-successful response.
To offer files for download, use send_file. def download(file) send_file file.path, :disposition => 'attachment' end
This Perl script will run diagnostics on your MySQL database and recommend changes to your MySQL configuration.
Edit /etc/default/bind9 and change OPTIONS="-u bind" to OPTIONS="-u bind -d 50 -g" Restart BIND and you'll see...
SSHKit 1.9.0 might fail with the following error, when trying to deploy a Rail application. Upgrading the gem to version...
.../home/foobar/Downloads/RDSCli-1.4.007/bin/rds-modify-db-parameter-group utf8 --region eu-west-1 --aws-credential-file .aws-credential.txt \ --parameters="name=character_set_server, value=utf8, method=immediate" \ --parameters="name=character_set_filesystem, value=utf8, method=immediate" \ --parameters="name...
...method=immediate" \ --parameters="name=character_set_results, value=utf8, method=immediate" \ --parameters="name=collation_server, value=utf8_general_ci, method=immediate" \ --parameters="name=collation_connection, value=utf8_general_ci, method...
The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...
S3cmd is a free command line tool and client for uploading, retrieving and managing data in Amazon S3. S3cmd reads...
...body), an external API may still force you to send one. Angular's $http service will strip that header when the request data (body) is blank. [1] This is possibly...
Generate a password htpasswd -Bn firstname.lastname This will ask you for a password and use bcrypt (-B, more secure) and...
Sometimes you need to monitor a connection from your machine to a specific, single host or network in order to...
...call(worker, job_options, queue) tags = [worker.class.name, worker.jid] Rails.logger.tagged(*tags) { yield } end end Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add RailsLoggerSidekiqServerMiddleware end end Note that the 2nd argument...
Situation: You want to write a spec for a function inside an Angular service. This function at some point makes an API request and acts upon response. Notably, your Angular...
...Working test setup # Capitalized expressions are intended to be replaced with YOUR values describe 'SERVICE', -> beforeEach -> module 'MODULE' module ($urlRouterProvider) -> # Prevent uiRouter's initialization, i.e. do not sync the current...
Travis CI is a free continuous integration testing service. However, it is really fragile and will break more than it will work. If you choose to use it anyway, learn...
You may encounter problems with passenger starting an application with an updated rails. If you find an error like this...
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...
...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...