Skip to content

Instantly share code, notes, and snippets.

View dwichan0905's full-sized avatar
💒
Working from Home

Dwi Candra Permana, S.Kom dwichan0905

💒
Working from Home
View GitHub Profile
@qamarelsafadi
qamarelsafadi / BaseDialog.kt
Last active April 4, 2023 10:09
This class is generic class for creating your custom dialogs, it will helps you to use one class for all ur custom dialogs.
/*
* Created by Qamar A. Safadi on 6/13/22, 9:50 PM
* Copyright (c) 2022 .
*/
package com.example.qamar.ui.base
import android.app.Dialog
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
@qamarelsafadi
qamarelsafadi / NavgationComponentExtensions.kt
Last active June 14, 2022 07:38
This gist file will include all Navigation Component usefull Extensions.
/*
Qamar A. Safadi
*/
fun NavController.safeNavigateWithClearBackStack(
@IdRes currentDestinationId: Int,
@IdRes id: Int,
args: Bundle? = null
) {
if (currentDestinationId == currentDestination?.id) {
@qamarelsafadi
qamarelsafadi / BaseBottomSheet.kt
Last active August 2, 2023 04:56
This class is a generic class for BottomSheetDialogFragment using Kotlin, it will helps you to use one class for all ur bottom sheets on your app.
/*
* Copyright (c) 2022. Qamar A. Safadi
*/
package com.qamar.test.base
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
Task 1: Create a project jumphost instance
Navigation menu > Compute engine > VM Instance
Task 2: Create a Kubernetes service cluster
gcloud config set compute/zone us-east1-b
gcloud container clusters create nucleus-webserver1
@vanduc1102
vanduc1102 / step1-qwiklabs.jinja
Last active May 29, 2021 08:59
Configure a Firewall and a Startup Script with Deployment Manager https://www.qwiklabs.com/focuses/1736?parent=catalog
resources:
- type: compute.v1.instance
name: vm-test
properties:
zone: {{ properties["zone"] }}
machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/f1-micro
# For examples on how to use startup scripts on an instance, see:
# https://cloud.google.com/compute/docs/startupscript
metadata:
items:
@mileskrell
mileskrell / build.gradle.kts
Created April 19, 2019 04:26
Example of declaring Android signing configs using Gradle Kotlin DSL
android {
signingConfigs {
getByName("debug") {
keyAlias = "debug"
keyPassword = "my debug key password"
storeFile = file("/home/miles/keystore.jks")
storePassword = "my keystore password"
}
create("release") {
keyAlias = "release"
@jorgenpt
jorgenpt / TextProgressBar.cs
Last active April 2, 2020 03:27
Text based progress bar for C#
using System;
using System.Collections.Generic;
namespace JPT
{
public class TextProgressBar : IDisposable
{
private int _progress;
private int _total;
private int _width;
@mul14
mul14 / 00_etc-hosts.md
Last active April 2, 2024 06:39
/etc/hosts for Vimeo, Reddit, Imgur, GitHub, DigitalOcean, dll

Unblock Steam, Vimeo, Reddit, Imgur, GitHub, DigitalOcean, NPM, PayPal, dll

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows