Skip to content

Instantly share code, notes, and snippets.

View aperkaz's full-sized avatar
🚀
In the zone

Alain Perkaz aperkaz

🚀
In the zone
View GitHub Profile
@aperkaz
aperkaz / JSDecorators.md
Last active January 6, 2018 17:56
JS Decorators in React

JS Decorators in React

Short practical guide to clarify the use cases of Decorators (aka HOF) and High Order Components. The examples is applicable for general JS, but are contructed using ES2015 + React.

Higher Order Functions and Higher Order Components

Higher Order Functions (HOF) are functions that receive functions as arguments (Inception :/) and return functions. They operate over functions instead of "simple" variables. Decorators provide syntactic suggar for implementing HOFs JS, to modify and extend passed functions.

Higher Order Components (HOC) are a React specific patter, very much similar to the aforemntioned HOF. Instead of receiving functions as argumnets, Components are passed. They are especially useful to add stateful wrappers to componets and alter livecycle

@aperkaz
aperkaz / DockerDevelopment.MD
Last active February 23, 2018 19:04
Docker Development

Docker Development

Short gist with Node development using Docker.

Effimeral container (with bash)

Span a Node docker container and connect into it.

Features

  • Mount bolume that will be removed on leave: -it --rm
@aperkaz
aperkaz / CommandCheatsheet.md
Last active February 6, 2018 11:31
Ubuntu command cheat-sheet

Ubuntu Command Cheatsheet

General usage ubuntu comments. Separated in general and development related.

General

General scope useful commands

  • Sync VM machine time
sudo ntpdate ntp.ubuntu.com