Skip to content

Instantly share code, notes, and snippets.

View neciu's full-sized avatar

Tomasz Netczuk neciu

View GitHub Profile
@neciu
neciu / Component.after.js
Created July 27, 2017 21:33
[Your last ESLint config] after lint
import React from 'react';
const Component = ({ a, b }) =>
<div>
<h1 onClick={b}>
LOL {a}
</h1>
</div>;
export default class SecondComponent extends React.Component {
@neciu
neciu / Component.before.js
Created July 27, 2017 21:31
[Your last ESLint config] before lint
import React from 'react';
const Component = (
{a, b}
) => <div>
<h1 onClick= {b}>LOL {a}</h1>
</div>;
export default class SecondComponent extends React.Component {
state = {field1: 'one', field2: 'two',
@neciu
neciu / .eslintrc.js
Created July 27, 2017 20:19
[Your last ESLint config] extended React .eslintrc.js
module.exports = {
extends: ['last', 'prettier/react', 'plugin:react/recommended'],
};
@neciu
neciu / index.js
Created July 27, 2017 19:55
[Your last ESLint config] index.js
const eslintrc = require('./.eslintrc');
module.exports = eslintrc;
@neciu
neciu / .eslintrc.js
Last active July 27, 2017 19:30
[Your last ESLint config] .eslintrc.js
module.exports = {
extends: ['eslint:recommended', 'prettier'], // extending recommended config and config derived from eslint-config-prettier
plugins: ['prettier'], // activating esling-plugin-prettier (--fix stuff)
rules: {
'prettier/prettier': [ // customizing prettier rules (unfortunately not many of them are customizable)
'error',
{
singleQuote: true,
trailingComma: 'all',
},
import {
Dimensions,
PixelRatio,
Navigator,
} from 'react-native';
import buildStyleInterpolator from 'react-native/Libraries/Utilities/buildStyleInterpolator';
const SCREEN_WIDTH = Dimensions.get('window').width;
const FromTheRight = {
@neciu
neciu / index.ios.js
Created February 22, 2016 08:31
React Native 0.20 border radius problem
import React, {
StyleSheet,
View,
AppRegistry,
} from 'react-native';
const BorderRadiusProblem = () => {
const styles = StyleSheet.create({
wrapper: {
padding: 16,
@neciu
neciu / gist:6bfeab3e3ae38638d8fb
Last active May 23, 2017 11:21 — forked from koriroys/gist:dc53d8d7034512a995bc
Added hax enabling auto filing from existing models/properties.

Integrating TinyMCE in an ember-cli app

TinyMCE is a javascript WYSIWYG editor that is highly configurable and has a ton of features and plugins. It integrates with jQuery and, with a bit of work, it can be integrated in your ember-cli app.

Step 1: Install TinyMCE:

bower install --save tinymce

Step 2: Import the required files into your app via broccoli. In order to do that you will need a plugin called broccoli-static-compiler: