This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A memory-saving ActiveRecord setting has been used by just one application ever, according to GitHub | |
| There's a common performance problem in many Rails background jobs. | |
| Background jobs often do operations across large sets of data. Basically, they do silly things like User.all.each(&:send_daily_newsletter). | |
| So, there's a problem with that query. In development and test environments, User.all will probably return a few rows, maybe a dozen at most. Most developers have extremely limited seed data on their local machines. | |
| In production, however, User.all will probably return quite a few rows. Depending on the app you work on, maybe a few hundred thousand. | |
| There's a tiiiiiny issue with a result set that returns 100,000 rows, and it's not just that the SQL query will take a long time to return. It will have irreversible effects on your Ruby app too! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First, we need to find our device. BEFORE inserting your USB drive, run the | |
| # following: | |
| diskutil list | |
| # This will output a bunch of info about all of the disk drives connected to | |
| # your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
| # some number starting at 0. Now, insert your USB drive and run the command | |
| # again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
| diskutil list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # A sneaky wrapper around Rubocop that allows you to run it only against | |
| # the recent changes, as opposed to the whole project. It lets you | |
| # enforce the style guide for new/modified code only, as opposed to | |
| # having to restyle everything or adding cops incrementally. It relies | |
| # on git to figure out which files to check. | |
| # | |
| # Here are some options you can pass in addition to the ones in rubocop: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 127.0.0.1 3ad.doubleclick.net | |
| 127.0.0.1 ad-emea.doubleclick.net | |
| 127.0.0.1 ad-g.doubleclick.net | |
| 127.0.0.1 ad-yt-bfp.doubleclick.net | |
| 127.0.0.1 ad.3au.doubleclick.net | |
| 127.0.0.1 ad.ae.doubleclick.net | |
| 127.0.0.1 ad.au.doubleclick.net | |
| 127.0.0.1 ad.be.doubleclick.net | |
| 127.0.0.1 ad.br.doubleclick.net | |
| 127.0.0.1 ad.de.doubleclick.net |