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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
echo $remoteport | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
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
# Create a pkg.json file containing everything your jail needs to install and run Komga. | |
echo '{"pkgs":["openjdk11-jre","nano","ca_root_nss","yarn"]}' > /tmp/pkg.json | |
# Using that file we just made, create the jail with IOCAGE. Replace <KOMGA> with the IP you want the Komga server to have on your network and <ROUTER> with the address of your network's router. | |
iocage create -n "komga" -p /tmp/pkg.json -r 12.2-RELEASE ip4_addr="vnet0|<KOMGA>/24" defaultrouter="<ROUTER>" vnet="on" allow_raw_sockets="1" boot="on" | |
# We can now safely delete that file we created earlier. | |
rm /tmp/pkg.json | |
# Make a config directory to store Komga, its config files, the database and logs. |
This is tested with Traefik 1.7
This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals
https://example.com
->https://example.com/abc/xyz/
https://example.com/
->https://example.com/abc/xyz/
https://example.com/something
-> no redirect
The aim of Dart FFI project (tracked as Issue #34452) is to provide a low boilerplate, low ceremony & low overhead way of interoperating with native C/C++ code.
The motivation behind this project is twofold:
Download and Install Emscripten
- My preferred installation location is
/home/user
- Get the latest sdk:
git clone https://github.com/emscripten-core/emsdk.git
- Enter the cloned directory:
cd emsdk
- Checkout main:
git checkout main
- Install the lastest sdk tools:
./emsdk install latest
- Activate the latest sdk tools:
./emsdk activate latest
- Activate path variables:
source ./emsdk_env.sh
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
//=== library ===// | |
#include <typeinfo> | |
#include <type_traits> | |
#include <utility> | |
enum class visit_event | |
{ | |
container_begin, | |
container_end, | |
leaf, |
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
all: libsudoku.js sudoku.js sudoku | |
clean: | |
rm -f libsudoku.js sudoku.js sudoku | |
rm -f libsudoku.js.map sudoku.js.map | |
rm -f libsudoku.js.mem sudoku.js.mem | |
# library for using functions in hand written JavaScript code | |
libsudoku.js: libsudoku.c | |
emcc -g4 -Wall -Wextra -std=c11 $^ -o $@ \ | |
-s EXPORTED_FUNCTIONS="['_output', '_sudoku']" \ |
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
########################### GTEST | |
# Enable ExternalProject CMake module | |
INCLUDE(ExternalProject) | |
# Set default ExternalProject root directory | |
SET_DIRECTORY_PROPERTIES(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/third_party) | |
# Add gtest | |
# http://stackoverflow.com/questions/9689183/cmake-googletest | |
ExternalProject_Add( |
NewerOlder