Skip to content

Instantly share code, notes, and snippets.

View skevy's full-sized avatar
🏠
Working from home

Adam Miskiewicz skevy

🏠
Working from home
View GitHub Profile
var VideoCheckout = function() {
}
VideoCheckout.prototype.init(videoId, {container, modalContainer, width, height}) {
if(!modalContainer) {
modalContainer = document.body
}
@skevy
skevy / gist:8a4ffc3cfdaf5fd68739
Last active February 4, 2017 04:59
Redux with reduced boilerplate

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


@skevy
skevy / .babelrc
Created December 15, 2015 17:06
Transformer.js and babelrc for RN + Relay
{
"retainLines": true,
"compact": true,
"comments": false,
"plugins": [
"syntax-flow",
"transform-decorators-legacy",
"transform-function-bind",
"transform-export-extensions",
"transform-class-constructor-call",
@skevy
skevy / BranchLinkingIOS.js
Last active April 19, 2016 20:22
Branch Integration with React Native
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 June 3, 2016 17:02
hhvm (hhvm/hhvm/hhvm) on Mac OS X 10.11.3 - Homebrew build logs
Homebrew build logs for hhvm/hhvm/hhvm on Mac OS X 10.11.3
Build date: 2016-06-03 09:53:38
// 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;
}()