This file contains 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
// The most complex part of the modal system | |
// There are lot of small details heres | |
// I extracted this from a real project | |
// Notice: Hooks hide a lot of complexity | |
import { IModalOpen } from './types'; | |
import { closeModal } from './triggers'; | |
import { useEffect, useMemo, useRef, useState } from 'react'; | |
import { useEventBus } from '../eventBus'; | |
import { InsideModalProvider } from './context'; |
This file contains 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
import * as React from 'react'; | |
import mitt from 'mitt'; | |
interface IEventsMap { | |
modalOpen: { | |
content: React.ReactNode; | |
url?: string; | |
}; | |
modalClose: null; |
This file contains 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
class Controller < ActionController::Base | |
include DevelopmentLogging if Rails.env.development? | |
end |
This file contains 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
<?php | |
/* | |
Original version: | |
written by Jarrod Oberto | |
taken from http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/ | |
Example usage: | |
include("classes/Resize.php"); |
This file contains 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
# frozen_string_literal: true | |
# Complex counter counter caches | |
# | |
# Usage: | |
# | |
# In parent model | |
# class Post < ApplicationRecord | |
# ExplicitCounterCache.define(self, votes_count, -> { votes.active }) | |
# ExplicitCounterCache.define(self, comments_count, -> { votes.visible }) |
This file contains 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
# frozen_string_literal: true | |
# Note(rstankov): | |
# | |
# **Don't use for `connection`s, only for `field` attributes** | |
# | |
# Preload associations. | |
# | |
# Supports all preload formats from [ActiveRecord::Base.includes](https://api.rubyonrails.org/v5.2.4/classes/ActiveRecord/QueryMethods.html#method-i-includes). | |
# |
We are searching for Team Lead to work with product managers, designers, and engineers to shape product direction and deliver great features.
- Managing and mentoring your fellow engineers
- Collaborating closely with product and designer to ship great products
- Driving your team roadmap, from conception to production
- Leveraging research and usage data to iterate on these products
- Brainstorming architecture and product decisions with the team.
NewerOlder