Skip to content

Instantly share code, notes, and snippets.

@CoralSilver
CoralSilver / gitflow.md
Created June 19, 2018 13:25 — forked from sheremetat/gitflow.md
Git rebase workflow

Step 1: Checkout a new working branch from updated master

 git checkout -b <branchname>

Step 2: Make Changes

 git add
 git commit -m "description of changes"

Step 3: Sync with remote

@CoralSilver
CoralSilver / README.md
Created May 1, 2018 21:08 — forked from mjfoster83/README.md
D3js v4 Stacked Bar Chart - with Tooltip Hover
@CoralSilver
CoralSilver / README.md
Created May 1, 2018 21:08 — forked from mjfoster83/README.md
D3js v4 Stacked Bar Chart - with Tooltip Hover
@CoralSilver
CoralSilver / using-eslint-with-prettier.md
Created March 27, 2018 14:55 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools that allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via [prettier-eslint-cli](https://github.co
@CoralSilver
CoralSilver / RandomID.js
Last active May 26, 2024 08:13
RandomID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
@CoralSilver
CoralSilver / config.js
Last active July 10, 2021 13:37 — forked from vernondegoede/config.js
Storybook config with ThemeProvider
// File: .storybook/config.js
import { configure, addDecorator } from '@kadira/storybook';
import Theme from './../src/ui/theme';
import React from 'react';
import { ThemeProvider } from 'styled-components'
function loadStories() {
require('../stories');
}
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",