Skip to content

Instantly share code, notes, and snippets.

View krystofwoldrich's full-sized avatar
🐝
Busy bee, improving my code every day.

Krystof Woldrich krystofwoldrich

🐝
Busy bee, improving my code every day.
View GitHub Profile
@ericblue
ericblue / gist:acb761461519ec0c9fae03222a604416
Created January 30, 2023 02:16
Gradle - Support loading of environment variables from a custom .env file prior to run (works in IDE and CLI)
// Loads environments variables from files contained in .env located in the CWD'
// See: https://stackoverflow.com/questions/36322536/how-to-set-an-environment-variable-from-a-gradle-build
run.doFirst {
if (project.file('.env').exists()) {
file('.env').readLines().each() {
if (!it.isEmpty() && !it.startsWith("#")) {
def (key, value) = it.tokenize('=')
if (System.getenv(key) == null) {
println "Setting environment variable for ${key}"
environment key, value

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active September 19, 2024 12:38
Building a react native app in WSL2
chrome.webRequest.onHeadersReceived.addListener(
function (details) {
for (var i = 0; i < details.responseHeaders.length; ++i) {
if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') {
details.responseHeaders.splice(i, 1);
return {
responseHeaders: details.responseHeaders
};
}
}