Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
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
public class SyncManager : IDisposable | |
{ | |
private readonly MobileServiceClient _client; | |
private readonly MobileServiceSQLiteStore _store; | |
public SyncManager() | |
{ | |
_client = Locator.Current.GetService<MobileServiceClient>(); | |
_store = new MobileServiceSQLiteStore(Constants.OfflineDbPath); | |
} |
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
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest single run all tests", | |
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"args": [ | |
"--verbose", |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest single run all tests", | |
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"args": [ | |
"--verbose", |
Install, build and debug a flutter app in WSL2 (Windows Subsystem for Linux).
To install the JDK, execute the following command, which will also install the JRE:
sudo apt install default-jdk
Add the following two lines to /etc/profile
(setting the JAVA_HOME
environment variable):
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
# Forward WSL2 ports to host machine/platform (handles Windows Firewall) | |
# | |
# NOTE: 'iex' is a shortform for 'Invoke-Expression' | |
# Ports that should be forwarded to WSL2 and allowed through firewall (comma-separated) | |
$ports = @(8081); | |
# WSL IP address changes whenever WSL restarts | |
$wsl_ip = $(wsl hostname -I).Trim(); |
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
#!/usr/bin/env bash | |
# MySQL / MariaDB Dump Helper | |
# =========================== | |
# FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument | |
# REQUIREMENTS: | |
# ============= | |
# GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv) |