Skip to content

Instantly share code, notes, and snippets.

View ilyachenko's full-sized avatar
😀
Happy

Illia Diachenko ilyachenko

😀
Happy
View GitHub Profile
@1st
1st / intro.md
Last active February 10, 2020 07:54
NPM watcher that helps to access data in the linked directory

Linking directory in ReactJS project

I found that users of Create-React-App script have issues with building few projects that are based on the same "core" library. Let's imagine that you have a ui directory where you keep all UI React components. And you have two projects - blog and shop.

Now you wish to use the shared UI components in both these projects. But if you will create a symlink to a "raw" source code (where you use ES2015) - you will see that your code can't be imported, because it expects that they should be already compiled.

@int128
int128 / README.md
Last active January 21, 2024 14:52
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

.wrapper {
display: flex;
justify-content: space-between;
}
[
{
"Title": "Avatar",
"Year": "2009",
"Rated": "PG-13",
"Released": "18 Dec 2009",
"Runtime": "162 min",
"Genre": "Action, Adventure, Fantasy",
"Director": "James Cameron",
"Writer": "James Cameron",
@imax
imax / cheatsheet.markdown
Last active July 25, 2022 11:36
Relocation cheatsheet

Compare cost of living in different locations around the world.

Country (city) Salary (gross) Taxes Apartment Visa More info
Germany (Berlin) €50-60k 27-33% €700-1200/mo Blue Card, 1-3 months, spouse can work de_faq на русском Numbeo
Estonia (Tallinn) €35-45k 41.5% €600-1200/mo 2 months, spouse can work Taxes
xxx

Legend:

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

const privateMethods = {
privateMethod () {
console.log(this.say);
}
}
export default class Service {
constructor () {
this.say = "Hello";
}
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@scabbiaza
scabbiaza / notes.md
Last active October 24, 2022 11:39
Quality Attributes for JS Frontend Application
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}