How to filter emails from GitHub in Gmail and flag them with labels.
The labels in this document are just examples.
| Filter | Label |
|---|
| # Instead of loading all of Rails, load the | |
| # particular Rails dependencies we need | |
| require 'sqlite3' | |
| require 'active_record' | |
| # Set up a database that resides in RAM | |
| ActiveRecord::Base.establish_connection( | |
| adapter: 'sqlite3', | |
| database: ':memory:' | |
| ) |
| Things Nick Hates | |
| 0) Ann Kitchen | |
| 1) non-shallow tests | |
| 2) `if !` | |
| 3) ants | |
| 4) rock stars | |
| 5) sunlight off porch windows when drinking coffee | |
| 6) people who feed the meter | |
| 7) using floats for money |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| module InteractorVisitor | |
| extend ActiveSupport::Concern | |
| included do | |
| around do |interactor| | |
| binding.pry | |
| '' | |
| interactor.call | |
| binding.pry | |
| '' |
| module OrganizerVisitor | |
| extend ActiveSupport::Concern | |
| included do | |
| def call | |
| self.class.organized.each do |interactor| | |
| binding.pry | |
| '' | |
| interactor.call!(context) | |
| binding.pry |
| class MyJob < ActiveJob::Base | |
| queue_as :urgent | |
| rescue_from(NoResultsError) do | |
| retry_job wait: 5.minutes, queue: :default | |
| end | |
| def perform(*args) | |
| MyService.call(*args) | |
| end |
| # Credit to http://snippets.freerobby.com/post/491644841/remove-merged-branches-in-git for the script on which this is based | |
| current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
| if [ "$current_branch" != "master" ]; then | |
| echo "WARNING: You are on branch $current_branch, NOT master." | |
| fi | |
| echo "Fetching merged branches..." | |
| git remote prune origin | |
| local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$") | |
| if [ -z "$local_branches" ]; then |
| require "net/http" | |
| def start_server | |
| # Remove the X to enable the parameters for tuning. | |
| # These are the default values as of Ruby 2.2.0. | |
| @child = spawn(<<-EOC.split.join(" ")) | |
| XRUBY_GC_HEAP_FREE_SLOTS=4096 | |
| XRUBY_GC_HEAP_INIT_SLOTS=10000 | |
| XRUBY_GC_HEAP_GROWTH_FACTOR=1.8 | |
| XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0 |