Skip to content

Instantly share code, notes, and snippets.

View ivopr's full-sized avatar
:shipit:

Ivo ivopr

:shipit:
View GitHub Profile
# Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it
# then iterate opening the selected ports
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ }
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if($found) {
$remoteport = $matches[0];
} else{
PlayStore.enabled = yes
abi.type = x86
avd.id = <build>
avd.ini.encoding = UTF-8
avd.name = android10
disk.cachePartition = yes
disk.cachePartition.size = 66MB
disk.dataPartition.path = <temp>
disk.dataPartition.size = 6442450944
disk.systemPartition.size = 0

So, you have installed Android Studio, and is setting it up for react native, buuuut you're new to fish and it seems like it doesn't have a .bashrc or .zshrc equivalent.

worry not, just run the following, in order:

Set the ANDROID_HOME variable, here the U will make it persist through restarts, and the x will make it be exported:

set -Ux ANDROID_HOME $HOME/Android/Sdk