Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Adam Miskiewicz skevy

🏠
Working from home
View GitHub Profile
View gist:f8f73076a5316f4bffa2
var VideoCheckout = function() {
}
VideoCheckout.prototype.init(videoId, {container, modalContainer, width, height}) {
if(!modalContainer) {
modalContainer = document.body
}
@skevy
skevy / BranchLinkingIOS.js
Last active Apr 19, 2016
Branch Integration with React Native
View BranchLinkingIOS.js
import { NativeModules } from 'react-native';
import RCTDeviceEventEmitter from 'RCTDeviceEventEmitter';
const BranchLinkingManager = NativeModules.BranchLinkingManager;
const BRANCH_DEEP_LINK_NOTIF_EVENT = 'openBranchDeepLink';
const _notifHandlers = new Map();
export class BranchLinkingIOS {
@skevy
skevy / # hhvm - 2016-06-03_09-53-38.txt
Created Jun 3, 2016
hhvm (hhvm/hhvm/hhvm) on Mac OS X 10.11.3 - Homebrew build logs
View # hhvm - 2016-06-03_09-53-38.txt
Homebrew build logs for hhvm/hhvm/hhvm on Mac OS X 10.11.3
Build date: 2016-06-03 09:53:38
@skevy
skevy / .babelrc
Created Dec 15, 2015
Transformer.js and babelrc for RN + Relay
View .babelrc
{
"retainLines": true,
"compact": true,
"comments": false,
"plugins": [
"syntax-flow",
"transform-decorators-legacy",
"transform-function-bind",
"transform-export-extensions",
"transform-class-constructor-call",
@skevy
skevy / gist:8a4ffc3cfdaf5fd68739
Last active Feb 4, 2017
Redux with reduced boilerplate
View gist:8a4ffc3cfdaf5fd68739

Note

I would recommend @acdlite's redux-actions over the methods suggested in this Gist.

The methods below can break hot-reloading and don't support Promise-based actions.

Even though 'redux-actions' still uses constants, I've come to terms with the fact that constants can be good, especially in bigger projects. You can reduce boilerplate in different places, as described in the redux docs here: http://gaearon.github.io/redux/docs/recipes/ReducingBoilerplate.html


View actionCreators_spec-solution-transformed.js
// Stubsfields out dropPellet
var SignupLoginTracking = importPathFromDirWithMock('/Users/amiskiewicz/airlab-shared/repos/airbnb/spec/javascripts/signup_login_dls/actions', '../../../../app/assets/javascripts/signup_login_dls/SignupLoginTracking', {
'../dropPellet': function () {
function dropPellet() {
return require('../../stubs/dropPellet');
}
return dropPellet;
}()