Skip to content

Instantly share code, notes, and snippets.

@kocisov
kocisov / index.js
Created April 1, 2018 06:36
Recharts
import * as React from 'react'
import { render } from 'react-dom'
import { PieChart, Pie, Cell } from 'recharts'
const data = [
{
name: 'Low thing',
value: 3,
color: '#d0d0d0',
},
@kocisov
kocisov / server.js
Created March 28, 2018 14:41
express or bust
// require your modules
var express = require('express')
var bodyParser = require('body-parser')
// create instance of express
var app = express()
// let app use body-parser
// this one is parsing application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))
@kocisov
kocisov / meca.js
Created February 20, 2018 11:34
xd
export default 'http://play.typeracer.com/?rt=i5gfna57v'
@kocisov
kocisov / index.js
Created September 1, 2017 23:38
flook
function flookThis (input) {
console.log(input)
}
@kocisov
kocisov / index.js
Created August 3, 2017 20:21
tp02l
// example
// don't overthink this too much
class X extends PureComponent {
// constructor equivalent for creating initial state
state = {
something: ''
}
// function that returns another function
changeReturn = () => e => {
@kocisov
kocisov / index.less
Created June 14, 2017 20:00
Atom icon Aesthetic UI xd
.icon::before {
animation: cc 5s infinite linear;
}
@keyframes cc {
0% {
color: #fff;
}
10% {
class E extends PureComponent {
changeText = e => {
this.setState({
text: e.target.value
});
}
render() {
return (
<div onClick={this.changeText} />
@kocisov
kocisov / package-list.txt
Created May 16, 2017 14:54
Package list
activate-power-mode@1.4.0
apex-syntax@0.1.0
apex-ui@0.2.1
ariake-dark-syntax@0.1.3
atom-beautify@0.29.24
atom-clock@0.1.7
atom-material-syntax@1.0.6
atom-material-ui@1.3.10
atom-ternjs@0.18.3
aurora-theme@1.2.2
class FirstComponent extends Component {
state = {
a: 2
}
changeState = val => {
this.setState({
a: val
})
}
@kocisov
kocisov / index.js
Created May 1, 2017 16:36
for smart bois
// smart boi with redux would do it like this
store = {
notification: {
status: 'error',
message: 'Error message'
} || {
status: 'success',
message: 'Success message'
}
}