sequelize-typescript | typeorm | knex | bookshelf | objection
sequelize-typescript | typeorm
import * as winston from 'winston'; | |
import * as moment from 'moment'; | |
const customLevels = { | |
levels: { | |
trace: 5, | |
debug: 4, | |
info: 3, | |
warn: 2, | |
error: 1, |
Publish AAR to jCenter and Maven Central | |
================= | |
[![Twitter](https://img.shields.io/badge/Twitter-@LopezMikhael-blue.svg?style=flat)](http://twitter.com/lopezmikhael) | |
Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central: | |
1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: [CircularImageView](https://github.com/lopspower/CircularImageView) | |
2. In the library folder(module) I have the lib code abovementioned. And applying in the build.gradle of this folder `apply plugin: 'com.android.library'` I got as output an .aar in the build/outputs/aar/ directory of the module's directory |
// At the top of the file | |
import AuthenticationServices | |
// ... | |
@objc | |
func appleSignIn(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { | |
if #available(iOS 13.0, *) { | |
let appleIDProvider = ASAuthorizationAppleIDProvider() | |
let request = appleIDProvider.createRequest() | |
request.requestedScopes = [.fullName, .email] |
import * as socketio from 'socket.io'; | |
import { Server } from 'http'; | |
import { logger } from '../../common/logger'; | |
import { server } from '../../server'; | |
/** | |
* Represents a socket server instance. | |
* This class wraps the final technology you will use to implements | |
* sockets, eg.: socket-io | |
* |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.xxx"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<!-- RNFirebase notifications --> | |
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |
<uses-permission android:name="android.permission.VIBRATE" /> |
#upgrade #rn #59 | |
para pasar de la 57 a la 59 | |
1) setear la version en package.json a la ultima de react y react native | |
2) rm -rf node_modules/ | |
3) rm package-lock.json | |
ios | |
4) rm -rf ios/Pods | |
5) rm ios/Podfile.lock |
apply plugin: "com.android.application" | |
import com.android.build.OutputFile | |
project.ext.react = [ | |
entryFile: "index.js" | |
] | |
apply from: "../../node_modules/react-native/react.gradle" |
import axios, { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios'; | |
import { ErrorExtra } from '../models/errores'; | |
export class HttpError extends ErrorExtra { | |
status: HttpErrorCode; | |
constructor(status: HttpErrorCode, mensaje: string = '', extra?: any) { | |
super(mensaje, extra); | |
this.status = status; | |
// Esto quita este constructor del stacktrace pero solo esta disponible en node, no browsers |
{ | |
"Crea nuevo modelo": { | |
"prefix": "snpNuevoModelo", | |
"body": [ | |
"import { Errores } from './errores';", | |
"", | |
"export interface I${1:}Attrs {", | |
" id?: string;", | |
" ${2:};", | |
"}", |