Skip to content

Instantly share code, notes, and snippets.

View gracefullight's full-sized avatar
👍

Eunkwang Shin gracefullight

👍
View GitHub Profile
@kuhelbeher
kuhelbeher / readme.md
Last active December 6, 2022 16:20
Eslint airbnb config + prettier for create-react-app project

This is tutorial of onfiguring eslint, prettier for your project

Make your code great again

  1. Eslint

First of all we need to install eslint and configs as dev dependencies. You can use your own config, but I will use config from airbnb:

yarn add -D eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
@ben-barbier
ben-barbier / retry-sub-observable.ts
Last active December 17, 2020 00:52
⚡️RxJS 🚀, mergemap with retry and fallback
public launchCachePreloading() {
this.nomenclatureService.getUniverses().pipe(
flatMap(e => e),
mergeMap(universe => this.nomenclatureService.getFamilies(universe.id).pipe(
flatMap(e => e),
map(family => ({universeId: universe.id, familyId: family.id})),
)),
toArray(),
mergeMap(families => interval(1000).pipe(
filter(() => this.router.url === '/'),
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 2, 2024 03:18
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@romanlex
romanlex / rollup.config.js
Created October 1, 2018 11:07
Rollup config
import sass from 'rollup-plugin-sass'
import webworkify from 'rollup-plugin-webworkify'
import bundleWorker from 'rollup-plugin-bundle-worker'
import autoprefixer from 'autoprefixer'
import alias from 'rollup-plugin-alias'
import babel from 'rollup-plugin-babel'
import cjs from 'rollup-plugin-commonjs'
import cssurl from 'postcss-url'
import env from 'postcss-preset-env'
import json from 'rollup-plugin-json'
@silentHoo
silentHoo / publish_to_private_npm_from_ci.md
Last active September 21, 2022 06:49
Push and pull into and from your private npm registry via CI pipeline

Publish to private npm registry from your CI pipeline

If you want to publish packages to your private registry, e.g. to jfrog.io/Verdaccio/... you should note some important things:

1) Authenticate on your local machine

To authenticate against the private repository, you've to use the npm cli tool. But first you should get your API access token. That's safer than using your password.

npm adduser --registry https://<registry_url>/<api_path>/ --always-auth
@ManzDev
ManzDev / rollup.config.js
Created February 24, 2018 17:13
RollUp Config file for easy ES6 to ES5 bundle
import babel from 'rollup-plugin-babel';
import eslint from 'rollup-plugin-eslint';
import resolve from 'rollup-plugin-node-resolve';
import multiEntry from 'rollup-plugin-multi-entry';
import uglify from 'rollup-plugin-uglify';
import filesize from 'rollup-plugin-filesize';
import commonjs from 'rollup-plugin-commonjs';
import progress from 'rollup-plugin-progress';
let pluginOptions = [
create assets folder inside android/app/src/main if not exist
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android
@zcaceres
zcaceres / Include-in-Sequelize.md
Last active January 8, 2024 07:14
using Include in sequelize

'Include' in Sequelize: The One Confusing Query That You Should Memorize

When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).

When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.

Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.

So let's go through the one query that's worth memorizing to handle your eager loading.

The Basic Query

@slitayem
slitayem / Mongodb_cheat_sheet.md
Last active March 19, 2018 06:52
Mongodb 3.x cheat sheet

Note: Tested on mongodb 3.4.1

Creating Collections, Documents, Indexes

See: MongoDB CRUD Operations

Command Description
db.createCollection("movies") Explicitly create a collection
@mix5003
mix5003 / LineExtendSocialite.php
Last active July 31, 2021 03:44
Line service provider for laravel socialite.
<?php
namespace SocialiteProviders\Line;
use SocialiteProviders\Manager\SocialiteWasCalled;
class LineExtendSocialite
{
/**
* Register the provider.