Skip to content

Instantly share code, notes, and snippets.

View firflant's full-sized avatar

Michał Kokociński firflant

View GitHub Profile
@firflant
firflant / App.js
Created April 18, 2019 11:51
Basic react-standalone-form usage example
import React from 'react'
import ReactDOM from 'react-dom'
import Form, {
FormThemeProvider,
Input,
Select,
FormButton,
} from 'react-standalone-form'
const BasicFormExample = () =>
@firflant
firflant / user-settings.json
Last active March 19, 2018 10:04
My VS Code config
{
"window.zoomLevel": 0,
"workbench.colorTheme": "Atom One Dark",
"sasslint.resolvePathsRelativeToConfig": true,
"editor.fontSize": 13,
"editor.tabSize": 2,
"editor.tabCompletion": true,
"editor.renderWhitespace": "boundary",
"editor.rulers": [80],
"editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?",
@firflant
firflant / agnosterhacked.zsh-theme
Created February 28, 2018 12:13
Agnoster with timestamp - a theme for ZSH terminal
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
# HACKED BY KOKOS - Timestamp added to prompt.
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
const story = {
id: 12345,
slug: 'pionner-in-marketing',
type: 'story', // One of two accepted values (story|graph)
category: 'People',
subcategory: 'Maryam Banikarim',
publisher: 'huffpost' // uniqie key from dictionary that we have to create.
title: 'A pionner in Marketing', // Is already.
description: 'I\'m surprised you had the courage to take the responsibility yourself. You mean it controls your actions? Remember, a Jedi can feel the Force flowing through him. But with the blast shield down, I can&aposm;t even see! How am I supposed to fight?', // Is already.
image: { // Is already, but as a string, not object and links works only on production.
@firflant
firflant / bemHelper.js
Last active October 23, 2017 21:02
BEM naming convention helper for React Components
// Helper function to generate String of class names for a block in BEM naming
// convention. Enter a block name (string) and modifiers (array) to return a
// string with block name class and all modifier classes.
export default function bemHelper(block, modifiers) {
if (modifiers) {
const classesArray = modifiers.map(modifier => `${block}--${modifier}`);
const classes = classesArray.join(' ');
return `${block} ${classes}`;
} else {
return block;