This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcrun simctl list | egrep '(Booted)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to log all console.log() in iOS release mode: | |
1. go to RCTLog (cmd shift o) | |
2. edit the method RCTLogTypeForLogLevel to: | |
static os_log_type_t RCTLogTypeForLogLevel(RCTLogLevel logLevel) | |
{ | |
return OS_LOG_TYPE_ERROR; | |
} | |
3. rebuild the app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install libimobiledevice | |
idevice_id --list // list available device UDIDs | |
idevicesyslog -u <device udid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import WebView from 'react-native-webview'; | |
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`; | |
export interface BlurContainerProps { | |
backgroundColor: RGBA; | |
blurRadius: number; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Entrar no postgres: | |
- psql postgres | |
Criar usuário: | |
- CREATE ROLE strapi WITH LOGIN PASSWORD 'strapi'; | |
Alterar senha para senha encriptada: | |
- ALTER USE strapi WITH ENCRYPTED PASSWORD 'strapi123'; | |
Criar banco de dados: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Veiculo { | |
constructor(nome, valor, cor) { | |
this._nome = nome; | |
this._valor = valor; | |
this._cor = cor; | |
} | |
get cor() { | |
return this._cor; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// agora a classe Ferrari extends Veiculo | |
Ferrari.prototype = Object.create(Veiculo.prototype); | |
// porém agora o constructor de Ferrari.prototype é igual | |
// ao de Veiculo.prototype... Precisamos resolver isso. | |
Ferrari.prototype.constructor = Ferrari; | |
let ff = new Ferrari(); | |
ff.acelerar() // works!! | |
Ferrari.prototype.constructor // Ferrari |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Veiculo(nome, valor, cor) { | |
this.nome = nome; | |
this.valor = valor; | |
this.cor = 'preto'; | |
}; | |
Veiculo.prototype.acelerar = function() { | |
console.log('aceleraaaaaa'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
navegaremos de construtor a construtor até obter um erro | |
no final na prototype chain | |
*/ | |
var set = new Set(); | |
console.log(set); | |
// [] | |
console.log(set.constructor); | |
// ƒ Set() { [native code] } | |
console.log(set.__proto__.constructor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// carregando o lodash na variável _ | |
const _ = require('lodash'); | |
function meuModulo() { | |
} | |
// você pode retornar uma função, objeto ou uma variável. | |
// agora o meuModulo pode ser importado usando o require. | |
module.exports = meuModulo; |
NewerOlder