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 SubdomainConstraint | |
# used in routes to generate subdomains | |
# note there is a cache buster in company.rb in case the subdomain is updated - `reload_routes` | |
# update it if we write any additional cache entries here | |
RESERVED_SUB_DOMAINS = %w[ | |
www app admin test staging help support wwww cdn owner media intercom mail r _domainkey blog webhooks webhook | |
hooks api api-test api-staging referral outbound mail webmail w3 mailboxes io heroku inbound google search | |
].freeze |
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
<html> | |
<head> | |
<style type='text/css'> | |
body, html { | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
color: black; | |
display: table; |
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 { ApolloClient } from 'apollo-client' | |
import { split } from 'apollo-link' | |
import { HttpLink } from 'apollo-link-http' | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import { getMainDefinition } from 'apollo-utilities' | |
import { createPersistedQueryLink } from 'apollo-link-persisted-queries' | |
import { setContext } from 'apollo-link-context' | |
// AC: IMPORT ACTIONCABLE | |
import ActionCable from 'actioncable' |
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
module Types | |
module PageableType | |
include Types::Base::Interface | |
field :current_page, Integer, null: true | |
field :previous_page, Integer, null: true, method: :prev_page | |
field :next_page, Integer, null: true | |
field :total_pages, Integer, null: true | |
field :total_items, Integer, null: true, method: :total_count | |
field :size, Integer, null: true, method: :count | |
field :first_page, Boolean, null: true, method: :first_page? |
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
<div data-controller="smart-scroll" | |
data-action="smart-scroll:added->smart-scroll#handleAdded | |
resize->smart-scroll#handleAdded | |
scroll->smart-scroll#handleScroll"> | |
<div data-controller="smart-scroll-item"> | |
aya: an an | |
</div> | |
<div data-controller="smart-scroll-item"> | |
hatate: ni hao | |
</div> |
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 axios from 'axios' | |
import toast from './toast' | |
function errorResponseHandler(error) { | |
// check for errorHandle config | |
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) { | |
return Promise.reject(error); | |
} | |
// if has response show the error |
bonus tip: for more darkness > https://darkreader.org/
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
version: 2 | |
jobs: | |
build: | |
working_directory: ~/mowers | |
docker: | |
- image: circleci/ruby:2.4.1-node | |
environment: | |
PGHOST: 127.0.0.1 | |
PGUSER: mower | |
RAILS_ENV: test |