tsc && node main.js
/** | |
* create a Google Sheet then go to Tools > Script Editor | |
* Paste this code into the editor. Save. | |
* Publish > Deploy as Web App | |
* Set new version, publish as me, who has access - anyone, even anon. | |
* GET to the URL, add on end ?sheet=[sheet name] | |
* Sheet name is the sheet name, manage appropriately (no spaces or symbols to keep it simple) | |
* Request returns JSON representation of the sheet. | |
*/ |
const { introspectSchema } = require("apollo-codegen"); | |
const { executeWithOptions } = require("graphql-code-generator/dist/cli"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const graphqlPath = "./src/graphql/"; | |
const schemaInput = "./src/graphql/temp.graphql"; | |
const jsonOutput = "./src/graphql/temp.json"; | |
const dtsOutput = "./src/graphql/domain.d.ts"; |
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
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
- Use Ember CLI
- In general, replace views + controllers with components
- Only use controllers at the top-level for receiving data from the route, and use
Ember.Controller
instead ofEmber.ArrayController
orEmber.ObjectController
- Fetch data in your route, and set it as normal properties on your top-level controller. Export an
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
#!/usr/bin/env sh | |
open "tel://$*" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
(function() { | |
// Do not use this library. This is just a fun example to prove a | |
// point. | |
var Bloop = window.Bloop = {}; | |
var mountId = 0; | |
function newMountId() { | |
return mountId++; | |
} |