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".
// 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 |
-- ------------------------------- | |
-- 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 |
/* | |
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; | |
} |
import UIKit | |
/// Represents a single `NSLayoutConstraint` | |
enum LayoutAnchor { | |
case constant(attribute: NSLayoutConstraint.Attribute, | |
relation: NSLayoutConstraint.Relation, | |
constant: CGFloat) | |
case relative(attribute: NSLayoutConstraint.Attribute, | |
relation: NSLayoutConstraint.Relation, |
STUFF = this is some stuff |
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! | |
*/ |
@Composable | |
fun ParallaxScreen(modifier: Modifier = Modifier) { | |
val context = LocalContext.current | |
val scope = rememberCoroutineScope() | |
var data by remember { mutableStateOf<SensorData?>(null) } | |
DisposableEffect(Unit) { | |
val dataManager = SensorDataManager(context) | |
dataManager.init() |
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
#!/bin/sh | |
# Reset Parallels Desktop's trial and generate a casual email address to register a new user | |
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml | |
jot -w pdu%d@gmail.com -r 1 |