Skip to content

Instantly share code, notes, and snippets.

View jucemar-dimon's full-sized avatar
🚀

Jucemar Dimon jucemar-dimon

🚀
  • Florianópolis-SC
View GitHub Profile
@jucemar-dimon
jucemar-dimon / coordenadas_estados_BR.js
Created July 12, 2019 02:28 — forked from ricardobeat/coordenadas_estados_BR.js
Coordenadas dos estados do brasil (centralizado, não capitais)
{
AC: [ -8.77, -70.55]
, AL: [ -9.71, -35.73]
, AM: [ -3.07, -61.66]
, AP: [ 1.41, -51.77]
, BA: [-12.96, -38.51]
, CE: [ -3.71, -38.54]
, DF: [-15.83, -47.86]
, ES: [-19.19, -40.34]
, GO: [-16.64, -49.31]
[
{
"codigo_ibge": 5200050,
"lat": -16.7573,
"lon": -49.4412
},
{
"codigo_ibge": 3100104,
"lat": -18.4831,
"lon": -47.3916
This adds support to use Conscrypt as Security Provider if available runtime. Consscrypt supports TLS 1.2 on Android 4.x and TLS 1.3 on all Android versions. Fixes issues (ex #23151) with HTTPS connections on Android 4.x.
Just add below to your project build.gradle and it'll use it:
implementation('org.conscrypt:conscrypt-android:2.0.0')
Workaround:
Please copy and paste below code in onCreate method of MyApplication.java:
@jucemar-dimon
jucemar-dimon / Fix debug errors in react-native
Last active November 25, 2019 01:30
A list of commands to fix errors in debug on react-native
cd android && gradlew clean
react-native start --reset-cache
npm install -g react-native-rename
react-native-rename "NomeDoProjeto" -b com.mycompany.app
Manually change de package folder
Guide for ANDROID
If you plan to do the changes manually then there are a lot of files to change. There may actually be more depending on what you have added to your project. This is a guide for changing a vanilla project.
In the application root
In the app.json change the name and the displayName to be "project"
In the package.json change the name to be "name": "project",
add in android/app/src/main/res/value
if there is no 'styles.xml' file then create your own 'styles.xml' and put the code below :
<resources>
<style name="SpinnerStyle" parent="@android:style/Widget.Spinner">
<item name="android:background">@null</item>
</style>
<style name="SpinnerItem" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:gravity">right</item>
In MacOs Mojave with RN 0.61 and Xcode 10.1, when pod install glog (0.3.5) error...
to resolve this, just type on terminal:
sudo xcode-select --switch /Applications/Xcode.app
npx --ignore-existing react-native init MyApp.
const Schema = Yup.object().shape({
password: Yup.string()
.required('Campo senha vazio.')
.matches(
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/,
'Must Contain 8 Characters, One Uppercase, One Lowercase, One Number and One Special Case Character',
),
changepassword: Yup.string().when('password', {
is: val => (val && val.length > 0 ? true : false),
then: Yup.string().oneOf(