Skip to content

Instantly share code, notes, and snippets.

View codigoinerte's full-sized avatar
馃彔
Working from home

Fredy Jhoel codigoinerte

馃彔
Working from home
View GitHub Profile
@codigoinerte
codigoinerte / RNFetchBlobReq.java
Created May 29, 2024 21:45
Actualicaci贸n de RNFetchBlobReq para SDK 34 y capar mensaje error en consola al descargar
#path: b/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
replace : appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
to:
if (Build.VERSION.SDK_INT >= 34 && appCtx.getApplicationInfo().targetSdkVersion >= 34) {
appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), Context.RECEIVER_EXPORTED);
}else{
appCtx.registerReceiver(this, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
@codigoinerte
codigoinerte / terminal-colors-branch.sh
Created January 19, 2023 23:17 — forked from danielalvarenga/terminal-colors-branch.sh
Show branch in terminal Ubuntu
# Add in ~/.bashrc or ~/.bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
NO_COLOR="\[\033[00m\]"
@codigoinerte
codigoinerte / templateSlice.js
Created September 27, 2022 00:15 — forked from Klerith/templateSlice.js
Cascaron para crear Redux Slices r谩pidamente
import { createSlice } from '@reduxjs/toolkit';
export const templateSlice = createSlice({
name: 'name',
initialState: {
counter: 10
},
reducers: {
increment: (state, /* action */ ) => {
//! https://react-redux.js.org/tutorials/quick-start
@codigoinerte
codigoinerte / babel.config.cjs
Created July 16, 2022 17:54
Create babel config to React + Vite
/*
In source project create a file babel.config.cjs no babel.config.js how 'https://jestjs.io/docs/getting-started'
*/
module.exports = {
presets: [
[ '@babel/preset-env', { targets: { esmodules: true } } ],
[ '@babel/preset-react', { runtime: 'automatic' } ],
],
};
@codigoinerte
codigoinerte / final-compile.txt
Last active July 15, 2022 16:07
Final compile react-native-bluetooth-escpos-printer
/*
1.- Add this lines to final android/build.gradle
2.- 'compileSdkVersion, buildToolsVersion and targetSdkVersion' should have same version to 'buildscript' in the same file
*/
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
@codigoinerte
codigoinerte / init-rn.md
Created March 10, 2022 00:20 — forked from Klerith/init-rn.md
Comando para crear aplicaci贸n de React Native con TypeScript

Comando para crear un proyecto de RN con TS

npx react-native init AwesomeTSProject --template react-native-template-typescript