Skip to content

Instantly share code, notes, and snippets.

@stigmat4j
stigmat4j / ProportionalImage.js
Created August 14, 2016 08:41 — forked from mikelambert/ProportionalImage.js
Renders an Image that stays proportionally sized to its original dimensions.
var ProportionalImage = React.createClass({
getInitialState() {
return {
style: {}
};
},
propTypes: {
originalWidth: React.PropTypes.number.isRequired,
@stigmat4j
stigmat4j / getting-started.md
Created August 3, 2016 19:02 — forked from pbojinov/getting-started.md
Getting Started with React Native Android
@stigmat4j
stigmat4j / gist:ccabcce0f2b30fa5377050b652c607cb
Created July 11, 2016 14:47 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@stigmat4j
stigmat4j / actions.js
Created February 26, 2016 13:51 — forked from roman01la/actions.js
Redux WebSockets recipe
const MODULE_NAME = 'base-app/events/'
export const CONNECT_WS = MODULE_NAME.concat('CONNECT_WS')
export const DISCONNECT_WS = MODULE_NAME.concat('DISCONNECT_WS')
export const SUBSCRIBE_WS = MODULE_NAME.concat('SUBSCRIBE_WS')
export const UNSUBSCRIBE_WS = MODULE_NAME.concat('UNSUBSCRIBE_WS')
export const EMIT_WS = MODULE_NAME.concat('EMIT_WS')
export const NEW_EVENT = MODULE_NAME.concat('NEW_EVENT')
export const ADD_EVENT = MODULE_NAME.concat('ADD_EVENT')
<Switch textLabel={"Keep sidebar always opened"} defaultChecked={JSON.parse(settings.sidebar || "false")} ref="checkbox" onChange={::this.onChange} />
import React, {Component} from 'react';
import {checkbox} from '../styles/Styles.js';
import Radium from 'radium';
class Switch extends Component {
@stigmat4j
stigmat4j / .eslintrc.js
Created December 15, 2015 10:44 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@stigmat4j
stigmat4j / i18n-data.json
Created November 10, 2015 17:03 — forked from DenisIzmaylov/i18n-data.json
Easy i18n translation in your ES6 apps
{
"ru": {
"Your original english text": "Твой оригинальный русский текст"
}
}
@stigmat4j
stigmat4j / README.md
Created November 8, 2015 18:37 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)