Skip to content

Instantly share code, notes, and snippets.

View rafaelrinaldi's full-sized avatar

Rafael Rinaldi rafaelrinaldi

View GitHub Profile
@rafaelrinaldi
rafaelrinaldi / index.js
Created January 19, 2017 16:02
ESLint custom rule to ensure TODO comments to follow a specific format
module.exports = {
meta: {
docs: {
description: 'requires a TODO to be specified either with a task number or URL and a message',
category: 'Best Practices',
recommended: true
},
schema: []
},
module.exports = {
config: {
fontSize: 18,
fontFamily: 'Roboto Mono, "DejaVu Sans Mono", "Lucida Console", monospace',
padding: '12px 14px',
},
plugins: [],
localPlugins: [
"###############################################################################
"# Bootstrap
"###############################################################################
" Vim doesn't like fish
set shell=/bin/bash
" be iMproved, required
set nocompatible
@rafaelrinaldi
rafaelrinaldi / route.js
Created September 1, 2016 02:54
Simple routes resolver
import settings from '../settings';
const {routes} = settings;
const {basePath} = routes;
/*
* Route path resolver.
* Read routes from the settings file.
*
* - id: route identifier (or alias)
@rafaelrinaldi
rafaelrinaldi / index.js
Created September 1, 2016 02:50
My own routes structure
import React from 'react';
import {render} from 'react-dom';
import configureStore from './configure-store';
import Root from './components/root';
const store = configureStore();
render(
<Root store={store} />,
document.querySelector('[data-app]')
SyntaxError: /Users/tesla/work/pizza/components/main.js: Unexpected token (24:4)
22 | {data.map(({group, links}, i) => (
23 | <LinkGroup key={i}>{group}</LinkGroup>
> 24 | {links.map((link, i) => (
| ^
25 | <Link key={i} {...link} />
26 | ))}
27 | ))}
FROM nginx
MAINTAINER Rafael Rinaldi <rinaldi@work.co>
# Copy custom configuration file from the current directory
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/mime.types /etc/nginx/mime.types
COPY nginx/.htpasswd /etc/nginx/.htpasswd
const webpack = require('webpack');
const PORT = process.env.PORT || 3000;
module.exports = {
devtool: 'eval',
entry: [
'babel-polyfill',
`webpack-dev-server/client?http://localhost:${PORT}`,
'webpack/hot/only-dev-server',
/**
* Export helpers to use all available colors.
* `color` prefix will fill `color` property, `bg-color` will fill
* `background-color`.
*
* 1. Map with all color names and values (hexa code).
* 2. Loop through all colors and export them as classes.
**/
$colors: ( // [1]
'magenta': $color-magenta,
"###############################################################################
"# Bootstrap
"###############################################################################
" Vim doesn't like fish
set shell=/bin/bash
" be iMproved, required
set nocompatible