Skip to content

Instantly share code, notes, and snippets.

View vovahost's full-sized avatar

Vlad vovahost

  • London
View GitHub Profile
@slightfoot
slightfoot / MainActivity.java
Created April 2, 2020 12:55
Draw Under System Ui in Flutter
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity
@manuelvicnt
manuelvicnt / AnAndroidApp.kt
Last active January 1, 2023 17:05
Hilt and AssistedInject working together in Hilt v2.28-alpha times - ViewModel version
// IMPORTANT! READ THIS FIRST
// Assisted Injection doesn't work with @HiltViewModel or @ViewModelInject
// Read more about the issue here: https://github.com/google/dagger/issues/2287
//
//
// AssistedInject and Hilt working together in v2.28-alpha times
// Example of a ViewModel using AssistedInject injected in a Fragment by Hilt
// As AssistedInject isn't part of Dagger yet, we cannot use in
// conjuction with @ViewModelInject
@ecyshor
ecyshor / proxy.ts
Last active March 8, 2023 04:36
nodejs reverse proxy google cloud function
import * as functions from 'firebase-functions';
import * as http from 'http';
const BUCKET_NAME = "target-bucket"
// check original code idea https://stackoverflow.com/a/10435819
exports.rewriteGCSRequest = functions.https.onRequest((oreq: any, ores: any) => {
const redirectPath = oreq.originalUrl === '/' ? '/index.html' : oreq.originalUrl
const options = {
// host to forward to