Using CSS Transitions on Auto Height Dimensions

01/30/21  Public, Other Languages

This is the way that worked best:

https://codepen.io/Sormano/pen/PReMjZ

Which is from one of the comments of this CSS Tricks article:

https://css-tricks.com/using-css-transitions-auto-dimensions/

1 vote - harrylevine

Parse any date time string into a date object

08/13/20  Public, Ruby General

Use Ruby's Date #strptime method to take any date or date time object that has been created with the [#strftime](https://ruby-doc.org/stdlib-2.5.0/libdoc/date/rdoc...

1 vote - harrylevine

Create a Rails path helper link to a specific anchor tag section of a page

06/13/20  Public, Rails Errors

Links to that page, scrolled to the DOM element containing id="autopilot-mode"

1 vote - harrylevine

Tail the test / spec logs

03/06/20  Public, Rails Errors

In a separate tab run:

1 vote - harrylevine

kill all ruby processes

03/04/20  Public, Ruby General

Kill all at once

1 vote - harrylevine

Find and extract a recurring pattern from a string

01/09/20  Public, Ruby General

For example, let's say that you have a string containing any number of Slack user ids (i.e. <@W012A3CDE>), and you need to extract out just the user ids.

Here is the string you are startin...

1 vote - harrylevine

Rails scope with and without arguments

12/11/19  Public, Rails General

Model scope with argument:

scope :for_company, ->(company_id) { where(company_id: company_id) }

Model scope without arguments:

scope :admins, -> { where(role: 'Admin') }

1 vote - harrylevine

Code review comments

01/31/20  Public, Rails Errors, Ruby General

instance variables / getters / setters

re: @redis

In general for getters and setters in our classes. Can we:

  1. limit the usage of instance variables to setters (@redis), i.e. where we are assigning things, and
  2. use an `attr_...

1 vote - harrylevine

Import a CSV file

02/17/19  Public, Ruby General

This is a simple implementation that uses Ruby's CSV class to:

  • import a local .csv file
  • account for the first line of the file being the headers
  • converting these headers in...

1 vote - harrylevine

Using Nokogiri to parse an XML page

02/16/19  Public, Ruby General, Gems

My solution for Upcase's Analyzing Shakespeare challenge where we:

  • take a given URL to an XML-encoded page
  • download and parse the page at runtime

Solution

...

1 vote - harrylevine