Skip to content

Instantly share code, notes, and snippets.

@lgnrvz
lgnrvz / AppModule.kt
Created September 2, 2023 06:52
A ViewModel for getting the realtime location and last time collection of the user with Dagger-Hilt implementation
import android.content.Context
import com.google.android.gms.location.FusedLocationProviderClient
import com.google.android.gms.location.LocationServices
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
@InstallIn(SingletonComponent::class)
@developer-guy
developer-guy / KIND_Networking.md
Created October 21, 2020 10:00 — forked from aojea/KIND_Networking.md
Use KIND to emulate complex network scenarios

Networking scenarios [Linux Only]

KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.

Docker Networking

KIND uses a docker user defined network.

It creates a bridge named kind

@theRemix
theRemix / exercise.md
Created July 26, 2015 02:25
MongoDB Practice

MongoDB Practice

MongoDB Exercise in mongo shell

Connect to a running mongo instance, use a database named mongo_practice.

Document all your queries in a javascript file to use as a reference.

Insert Documents

@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active May 6, 2024 04:15
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@ih2502mk
ih2502mk / list.md
Last active May 6, 2024 04:10
Quantopian Lectures Saved
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 6, 2024 04:07
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@sweetcard
sweetcard / InstanceRegistrationResource.java
Created May 6, 2024 04:07 — forked from PierreBesson/InstanceRegistrationResource.java
Eureka microservice manual registration
@RestController
@RequestMapping("registration")
public class InstanceRegistrationResource {
private final InstanceRegistrationService instanceRegistrationService;
public InstanceRegistrationResource(InstanceRegistrationService instanceRegistrationService) {
this.instanceRegistrationService = instanceRegistrationService;
}
@PostMapping("register")
@PierreBesson
PierreBesson / InstanceRegistrationResource.java
Created September 25, 2017 12:53
Eureka microservice manual registration
@RestController
@RequestMapping("registration")
public class InstanceRegistrationResource {
private final InstanceRegistrationService instanceRegistrationService;
public InstanceRegistrationResource(InstanceRegistrationService instanceRegistrationService) {
this.instanceRegistrationService = instanceRegistrationService;
}
@PostMapping("register")
@KlassenKonstantin
KlassenKonstantin / ClippedForeground.kt
Last active May 6, 2024 04:06
evervault.com inspired animation
import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.BlendMode
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.nativeCanvas
@Composable
@d9k
d9k / superset_config_docker.py
Created January 13, 2022 07:44
Superset welcome page redirect
import logging
import pprint
from flask import Flask, redirect
from flask_appbuilder import expose, IndexView
from superset.typing import FlaskResponse
logger = logging.getLogger()