...might leak memory: @app.directive 'awesomeMap', -> link: (scope, element, attributes) -> AwesomeMap.init(element) To prevent leaks, read the plugin's documentation for a way to destroy the plugin instance when you're...
...to issues, since string comparisons are case-insensitive in MySQL. (If you use PostgreSQL, read this instead.) Say you have a user model class User < ActiveRecord::Base validates_uniqueness_of...
...can reference global variables with an english name. This makes you code easier to read and is also suggested by Rubocop's Style/GlobalVars cop. Example before: if 'foo' =~ /foo/
...SEPARATOR => $, $RS => $/ $INPUT_RECORD_SEPARATOR => $/ $ORS => $\ $OUTPUT_RECORD_SEPARATOR => $\ $INPUT_LINE_NUMBER => $. $NR => $. $LAST_READ_LINE => $_ $DEFAULT_OUTPUT => $> $DEFAULT_INPUT => $< $PID => $$ $PROCESS_ID => $$ $CHILD_STATUS => $? $LAST_MATCH_INFO => $~ $IGNORECASE => $=
...top-right editor corner (or hit Ctrl + Shift + Y) and select "Start Session". Choose permissions: "Read-only" lets others only watch you. "Edit files" is needed for pairing. Note that...
...The article explains about how sharing setup between examples make test files harder to read and evolve. A related frustration I have is working on ultra-DRY & betterspecs-like test...
...to keep your test databases clean, if you're running multiple databases with full read and write access at the same time. This is especially useful when migrating old/existing databases...
...class MigrationRecord < ActiveRecord::Base self.abstract_class = true connects_to database: { writing: :my_app_migration, reading: :my_app_migration } # You never want to allow write access to the database you are...
...plain Net::HTTP: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Here is how to fix that in your application...
...RestClient.get('https://self-signed.badssl.com/') RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Self-signed certificates are basically fine, they were simply...
...user into the ETag of all actions def show ... end def index ... end end Read more Default controller implementation (with caching...
...Linear ID and the name of the issue using git commit --allow-empty -m Read the complete issue Reread the complete Issue and check if the issue needs further checkpoints...
...migrations, takes care of existing records if it makes major changes, has updated the README as appropriate 4 After Review 4.1 If your code does not pass review
...tests with PARALLEL_TEST_PROCESSORS=#{physical_cpu_count}.") end rescue CannotReadCPUCount => e warn('Cannot read CPU count: ' + e.message) end private def process_count if (env_value = ENV['TEST_ENV_NUMBER...
...trying to hunt down a staging bug locally), it might make sense to allow reading files from a separate environment. You you could read from an ENV variable instead of...
...of earlier versions Check the official Rails upgrade guide Rails has official upgrade notes. Read through the relevant sections and make the appropriate changes. Get rails console running
Sharing test setup can lead to DRY, but tightly coupled test code. Read Prefer self-contained examples for an argument for isolating tests instead, even if it means...
...your own controller Views using ERB Models Helpers Learn how to do CRUD ("Create", "Read", "Update", "Destroy") How to show a list of existing database records How to build a...
...list of actors. We will call this app "MovieDB" in subsequent cards. Skim the README file of the project if you have not done that already. Your MovieDB should deliver...
...no instruction for a backup strategy nor a guide for SQL dump performance optimization. Read before starting I will assume that all commands will be executed as local postgres user...
When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user...
...how the SELECT statement at the end is rather short and much easier to read. The CTE SELECTs are also quite readable. Imagine how a JOINed statement would look like...
...duration // => 210ms An example is storing a transition duration as CSS custom property to read it from Javascript. By converting the value like this, you can ensure your Javascript will...
...architecture. Most likely, you need to put [arch=amd64] after deb so that it reads deb [arch=amd64] https://... or deb [arch=amd64 signed-by=.... Workaround Step 2: Connect with...
...convoluted control flow inherently concurrent computer spends no time waiting for IO (accepting request, reading from database, pushing HTML over network) time can be spent by switching to next context...
done: callbacks.done }) } }) } }) } refreshUsers({ done: function() { console.log('Users refreshed!') } ); This is hard to read! If any step in the chain has an error, the chain silently stops Callbacks with...
.../LATEST_RELEASE" VERSION=$(curl -f --silent $VERSION_URL) if [ -z "$VERSION" ]; then echo "Failed to read current version from $VERSION_URL. Aborting." exit 1 else echo "Current version is $VERSION"
...whenever your Chrome is updated, run update-chromedriver and after one second you are ready to go. Example output: $ update-chromedriver Current version is 77.0.3865.40 Downloading to /tmp/chromedriver-77.0.3865.40.zip
...enables pulling default = current # Match remote branch with same name For more configuration examples, read on. Please only use configuration that you understand. Aliases [alias] amend = commit -v --amend # Amend...
...the code and get an idea how it works (you don't have to read or understand it completely). You can either use GitHub's code browser or clone the...
...was split in many. Fortunately, Git offers a special highlighting mode that directs the reader's attention to relevant code parts: git diff --color-moved=dimmed-zebra