Skip to content

Instantly share code, notes, and snippets.

View apieceofbart's full-sized avatar

Bartek apieceofbart

View GitHub Profile
@apieceofbart
apieceofbart / Button.tsx
Created October 10, 2017 10:37
Styled components with Typscript
import * as React from "react";
interface IProps {
children?: React.ReactChild;
className?: string;
}
class Button extends React.Component<IProps, {}> {
public render() {
return (
@apieceofbart
apieceofbart / es7-async-await.js
Created June 23, 2017 09:28
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@apieceofbart
apieceofbart / typescript-react-quickstart.md
Created June 10, 2017 15:15 — forked from benedyktdryl/typescript-react-quickstart.md
Quick notes for people starting with React & Typescript
@apieceofbart
apieceofbart / keys-mapping.ahk
Created May 3, 2017 07:31
AutoHotkey mappings
^Left::Send {Home}
^Right::Send {End}
^+Left:: Send {Shiftdown}{Home}
^+Right::Send {Shiftdown}{End}
@apieceofbart
apieceofbart / -README.md
Created April 22, 2017 10:19 — forked from jirutka/-README.md
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
@apieceofbart
apieceofbart / .eslintrc
Created March 7, 2017 07:04
Example of .eslintrc file
{
"extends": [ "eslint:recommended" ],
"env": {
"node": true,
"browser": true,
}
}