Install virtualbox and the extension pack:
brew install --cask docker virtualbox virtualbox-extension-pack
Download the ubuntu server image and create a VBox for it, the rest of the readme assumes it is named "Ubuntu Server".
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| -- ------------------------------- | |
| -- Watcher for changes of init.lua | |
| -- ------------------------------- | |
| function reloadConfig(files) | |
| doReload = false | |
| for _,file in pairs(files) do | |
| if file:sub(-4) == ".lua" then | |
| doReload = true | |
| end | |
| end |
| STUFF = this is some stuff |
STEP 2: setup docker to run react app (dev and production) configuration: https://gist.github.com/przbadu/929fc2b0d5d4cd78a5efe76d37f891b6
Because we are using Docker, we are not going to install node, npm, create-react-app
in our development machine, not even for generating create-react-app scaffold.
For this purpose I am using 2-step docker configuration:
create-react-app| // Swift 4 | |
| // Check out the history for contributions and acknowledgements. | |
| extension String { | |
| /// Returns a new string made by replacing all HTML character entity references with the corresponding character. | |
| /// | |
| /// - Returns: decoded string | |
| func decodingHTMLEntities() -> String { | |
| var result = String() | |
| var position = startIndex |
java -jar /home/expert/work/tools/apktool.jar d [email protected]android:networkSecurityConfig="@xml/network_security_config" attribute to application element.<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
| /* | |
| You need to call the below method once. It register the callback and fire it when there is a change in network state. | |
| Here I used a Global Static Variable, So I can use it to access the network state in anyware of the application. | |
| */ | |
| // You need to pass the context when creating the class | |
| public CheckNetwork(Context context) { | |
| this.context = context; | |
| } |
| package me.a_hoffmann.gists | |
| import android.content.Context | |
| import android.net.ConnectivityManager | |
| import android.net.NetworkCapabilities | |
| /** | |
| * Checks if the device has an internet connection. | |
| * NOTE: Works only on android API level 23 and above! | |
| */ |
After setting up docker to generate React app without installing node js in https://gist.github.com/przbadu/4a62a5fc5f117cda1ed5dc5409bd4ac1 It was confusing to some of the devs, how to run react app, so I am creating this as second step to the configuration.
cd my-react-app
touch Dockerfile Dockerfile.dev docker-compose.yml .dockerignore