...existing bash script to work for commits that are referencing Linear IDs. A core benefit of our convention to prefix commits by their corresponding issue ID is that we can...

...easily detect commits that belong to the same issue. You can either do that manually or use the bash script below. It can either be placed in your .bashrc or...

gem-session.com

If you want to exclude your staging site from Google using robots.txt without running the risk to forget deleting the...

...is a fix to SafeBuffer#gsub. Note that it will only fix the $1 behavior, not give you a safe string in the end (see below). Example def test(input...

...really expect outside code (read: Gems) to not use $1 (and there is plenty, believe me) when calling gsub on an input that may be a SafeBuffer, you need to...

Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger

...reject_if: :all_blank # Ignore the blank template record end class Image < ActiveRecord::Base belongs_to :gallery mount_uploader :teh_image, YourUploaderHere # Mount Carrierwave on attribute :teh_image end

...to automatically fix the whitespace, see below. (Note that this might lead to unexpected behaviour e.g. in Markdown documents.) The global git hooks live in $PREFIX/share/git-core/templates/hooks (where $PREFIX is probably...

makandracards.com

...of time, but it will always be retried at least a second time. This behavior allows with_scope to be patient, and it must be patient, as explained below.

I recently stumbled over a quirk in the way Ruby handles local variables that I find somewhat dangerous. Consider:

I used two lab days to read the The framework field guide - Fundamentals, the first of a three part series...

...Use the attached Modularity below to add such a magical array to your model. Besides using the trait, you will need to implement two methods to synchronize the string array...

Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

Large Rails projects tend to define multiple custom ways to format Dates or DateTimes. This often leads to duplicated format...

...Normalize characters in Ruby". Specs (for nerds) Here are some specs that describe the behavior of #to_sort_atoms: describe String do describe '#to_sort_atoms' do it 'should return...

apidock.com

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead. ActiveRecord models have with a method becomes(klass) which you can...

JavaScript objects can have getter and setter functions that are called when a property is read from or written to...

unpoly.com

Version 3.7.0 broke some things in complex forms. Sorry for that. Concurrent user input is hard. 3.7.1 This change fixes...

OpenAI is currently limiting the Audio generating API endpoint to text bodies with a maximum of 4096 characters.

Note: Making a reverse proxy with nginx is much more straightforward. A reverse proxy is a "man in the middle...

Ctrl + Alt + S > search "rubocop on save" Under "Inspections", check the highlighted box on rubocop -a Caveat: This adds a...

...its mount path. It starts with /media/. Open a terminal and sudo su to become root. We require root for everything. Use dd to create an image of your encrypted...

makandra dev

...which point the exception was thrown. def self.search_solr_with_exception_handling(*types, &block) begin search_solr_without_exception_handling(*types, &block) rescue Errno::ECONNREFUSED, Timeout::Error => e message = "Verbindung...

The gemspec for gems allows to add metadata to your gem, some of which have a special meaning and are...

adobe.com

Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to...