- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
| // Pretend that cookies work | |
| (function (document) { | |
| var cookies = {}; | |
| document.__defineGetter__('cookie', function () { | |
| var output = []; | |
| for (var cookieName in cookies) { | |
| output.push(cookieName + "=" + cookies[cookieName]); | |
| } | |
| return output.join(";"); | |
| }); |
| 'use strict'; | |
| import React, { PropTypes, Component } from 'react'; | |
| class LazyImg extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { loaded: false } | |
| this.handleLoad = () => { |
| # The MIT License (MIT) | |
| # Copyright (c) 2014 Dave Clark | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutation
Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
| export const GoogleApi = function(opts) { | |
| opts = opts || {} | |
| const apiKey = opts.apiKey; | |
| const libraries = opts.libraries || []; | |
| const client = opts.client; | |
| const URL = 'https://maps.googleapis.com/maps/api/js'; | |
| const googleVersion = '3.22'; | |
| let script = null; |
Why this transform is necessary?
Until React Native 24, you import React from 'react-native' package, but this will change on RN 25, you will need to import React from 'react'. You probably have many files that does this, so I've created a codemod to save you a bunch of time
- Install jscodeshif
| if [[ $BUILD_STATUS == "success" ]] | |
| then | |
| export STATUS="success" | |
| else | |
| export STATUS="failure" | |
| fi | |
| curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \ | |
| -H "Content-Type: application/json" \ | |
| -X POST \ |
| <Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |
| <!-- These settings control what the service's name, description etc appear in services.msc task panel. --> | |
| <PropertyGroup Label="ServiceMetaData"> | |
| <ServiceName>ShinyNewService</ServiceName> | |
| <ServiceDisplayName>Shiny New Service</ServiceDisplayName> | |
| <ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription> | |
| </PropertyGroup> | |
| <Choose> |