Skip to content

Instantly share code, notes, and snippets.

View yogithesymbian's full-sized avatar
✔️
scodeid - open source code id

Yogi Arif Widodo yogithesymbian

✔️
scodeid - open source code id
View GitHub Profile
import React, { useState, useCallback, useMemo } from 'react';
import { render } from 'react-dom';
import React, { useReducer } from 'react';
const tableSearchReducer = (state, action) => {
switch (action.type) {
case 'SET_SEARCH':
return { ...state, search: action.payload };
case 'SET_COLUMN_SEARCH':
return { ...state, column_search: action.payload };
@yogithesymbian
yogithesymbian / eslint_clean_code.js
Created November 20, 2024 06:21
eslint config clean code
rules: {
complexity: ['error', { max: 6 }],
'max-depth': ['error', { max: 2 }],
'max-nested-callbacks': ['error', { max: 2 }],
'max-params': ['error', { max: 3 }],
'max-statements': ['error', { max: 12 }, { ignoreTopLevelFunctions: false }],
'max-len': ['error', { code: 120, ignoreUrls: true }],
'max-lines': ['error', { max: 200, skipComments: true, skipBlankLines: true }],
},
@yogithesymbian
yogithesymbian / remember.md
Created November 13, 2024 05:37
fvm flutter check needed
~/.gradle/wrapper/dists/
~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/
~/.fvm/versions/
@yogithesymbian
yogithesymbian / case1.md
Created August 23, 2023 05:21
git my case
  1. i have create new branch from master yesterday, and its local on my pc.
  2. today in master gitlab have new updates
  3. how should i do

A. Update Your Local Master Branch:

git rebase main  
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
@yogithesymbian
yogithesymbian / MyVueTrigger.js
Last active August 6, 2023 03:45
vue composition-api life hack
this.anIncomingNotification = payload // trigger watch
@yogithesymbian
yogithesymbian / build.gradle
Created July 25, 2023 02:50
use flutter cache local replace version from your friend code/project.
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
// START: FlutterFire Configuration
@yogithesymbian
yogithesymbian / video compression ffmpeg custom bash command
Created June 10, 2023 11:45
using ffmpeg command on bashscript to short a command for compression video .mov to .mp4
1. create file custom
```
touch ~/.custom_bash_commands.sh
```
2. Open this up in your preferred text editor, and add the following code:
```
#!/bin/bash
That doesn't start cemu with the env var active. You have to set the variable in the terminal, then launch cemu from the terminal:
1. Open terminal
2. Paste cd /Applications/Cemu.app/Contents/MacOS and hit return
3. Paste MVK_CONFIG_FAST_MATH_ENABLED=0 ./Cemu and hit return
@yogithesymbian
yogithesymbian / ryujinx macbook pro m1.md
Last active January 7, 2023 22:33
ryujinx testing - list game on macbook pro m1
@yogithesymbian
yogithesymbian / usage.winston.md
Created November 23, 2022 23:32
Utils Winston Node JS

usage

const winLogger = require('@utils/winston')

winLogger.info(`your message`)

output