Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import PropTypes from 'prop-types' | |
import {AppProvider, Page, Card, Button} from '@shopify/polaris'; | |
const Users = props => ( | |
<AppProvider> | |
<Page title="Users"> | |
{props.users.map((user, index) => ( | |
<Card key={index} |
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add bootstrap@4.0.0-beta jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
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 |
This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.
It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.
CURRENT_DATE=`date -Ru | sed 's/+0000/GMT/'` | |
CHECKSUM=$(echo -n "application/json,,/transactions/<ID>,$CURRENT_DATE" \ | |
| openssl dgst -sha1 -binary -hmac "your-secret-key" \ | |
| base64) | |
curl "https://apix.casiregalii.com/transactions/<ID>" \ | |
-X GET \ | |
-H "Accept: application/vnd.regalii.v3.2+json" \ | |
-H "Content-Type: application/json" \ | |
-H "Content-MD5:" \ |
CURRENT_DATE=`date -Ru | sed 's/+0000/GMT/'` | |
CHECKSUM=$(echo -n "application/json,,$CURRENT_DATE" \ | |
| openssl dgst -sha1 -binary -hmac "your-secret-key" \ | |
| base64) | |
curl "https://apix.casiregalii.com/rpps_billers" \ | |
-X GET \ | |
-H "Accept: application/vnd.regalii.v3.2+json" \ | |
-H "Content-Type: application/json" \ | |
-H "Content-MD5:" \ |
CURRENT_DATE=`date -Ru | sed 's/+0000/GMT/'` | |
CHECKSUM=$(echo -n "application/json,,/bills/<ID>/pay,$CURRENT_DATE" \ | |
| openssl dgst -sha1 -binary -hmac "your-secret-key" \ | |
| base64) | |
curl "https://apix.casiregalii.com/bills/<ID>/pay" \ | |
-X POST \ | |
-d '{"amount":5568.00, "currency":"USD"}' \ | |
-H "Accept: application/vnd.regalii.v3.2+json" \ | |
-H "Content-Type: application/json" \ |