Skip to content

Instantly share code, notes, and snippets.

View diegorribeiro's full-sized avatar
🎯
Focusing

Diego Ribeiro diegorribeiro

🎯
Focusing
View GitHub Profile

Copy Bitbucket repo to GitHub

Whenever possible, use GH's "Import repository" feature.

The import feature doesn't always work, though. In my experience, I tried to import a repo and it failed with a generic message. I had to contact GH support to ask for help. They told me my repo had a large file (>100MB), which couldn't be added to GH directly. I had to either remove the file or store it in GH LFS. In this case, one of the CLI methods below are needed:

CLI: Copy the master branch only (OK)

@diegorribeiro
diegorribeiro / php-config-external.md
Created May 25, 2023 20:23
Configurando o PHP para ser acessado por outro pc na rede

Essa configuração servirá para quem está testando a api por um outro computador que não seja o localhost da aplicação. dessa forma você poderá testar se seu app está funcionando com a api respondendo de maneira correta e simular o cenário de um servidor externo.

Procure o arquivo httpd.conf na pasta do PHP e encontre as seguintes linhas:

DocumentRoot "c:/xampp/htdocs"
<Directory "c:/xampp/htdocs">
    # ...Stuffs in here
    Options Indexes FollowSymLinks
    # ...Stuffs in here
@diegorribeiro
diegorribeiro / config.md
Created May 16, 2023 11:47
Zsh environment for Android SDK

Goto zsh terminal and run these steps bellow:

Create .zshenv file

$ touch ~/.zshenv

Run vim and edit the .zshenv file

$ vim ~/.zshenv

Copy e Paste these commands in zshenv file

$ export ANDROID_HOME=/Users/#YOUR_USER_HERE/Library/Android/sdk

@diegorribeiro
diegorribeiro / podforceupdate.sh
Created May 11, 2023 20:53 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@diegorribeiro
diegorribeiro / change-tools.MD
Created May 11, 2023 20:53
If you run pod install and failed due to glog during project initialisation

Change commant Line Tools location

I'm using XCode Version 14.0 and have select Command Line Tools from its Locations tab. I also tried:

sudo xcode-select --switch /Applications/Xcode.app

@diegorribeiro
diegorribeiro / DOWNGRADE.md
Created April 18, 2023 22:43
React-native npm start -> Error message "error:0308010C:digital envelope routines::unsupported"

// IF you are using node 17 and you see this error: // Error message "error:0308010C:digital envelope routines::unsupported"

// Downgrade to node 16.13.0

// And Install the nvm using chocolatey: choco install nvm

// Go to your project folder and run this command: nvm install 16.13.0

@diegorribeiro
diegorribeiro / ohmyz.sh
Created December 1, 2022 23:07
Zsh better customizing
# Trust me, you can't do a better job customizing your own .zshrc file.
# Just go here: https://ohmyz.sh/#install
# Run this command in your terminal:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@diegorribeiro
diegorribeiro / Xcode_remove_all_files.MD
Last active November 29, 2022 18:53
For a complete removal of Xcode

For a complete removal of Xcode 10 delete the following:

Run in terminal rm -rf and the lines below one by one

/Applications/Xcode.app
~/Library/Caches/com.apple.dt.Xcode
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.Xcode.plist

/Library/Preferences/com.apple.dt.Xcode.plist

@diegorribeiro
diegorribeiro / Android_Studio_Remove.MD
Last active October 27, 2022 23:52
Remove Android-Studio completely on Mac [Android, Emulators, Platform Tools and More]

Execute these commands in the terminal (excluding the lines with hashtags - they're comments):

Deletes the Android Studio application

Note that this may be different depending on what you named the application as, or whether you downloaded the preview version

rm -Rf /Applications/Android\ Studio.app

Delete All Android Studio related preferences

The asterisk here should target all folders/files beginning with the string before it

rm -Rf ~/Library/Preferences/AndroidStudio* rm -Rf ~/Library/Preferences/Google/AndroidStudio*

Deletes the Android Studio's plist file

@diegorribeiro
diegorribeiro / generate_key.sh
Created October 27, 2022 13:40
[rn][mac][mobile,build,release] Create keystore to build signed APP android
sudo keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000