Skip to content

Instantly share code, notes, and snippets.

View rhonyabdullah's full-sized avatar

Rhony rhonyabdullah

  • Jakarta/Indonesia
View GitHub Profile
@Zhuinden
Zhuinden / FragmentViewBindingDelegate.kt
Last active February 24, 2024 20:13
Fragment view binding delegate
// https://github.com/Zhuinden/fragmentviewbindingdelegate-kt
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty
@agusibrahim
agusibrahim / ConnectionStatus.java
Last active July 3, 2017 00:45
Check Network Connectivity available or not
package ai.agusibrahim.kepooto;
import java.net.Socket;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import android.os.AsyncTask;
import ai.agusibrahim.kepooto.ConnectionStatus.*;
import android.content.Context;
import android.net.ConnectivityManager;
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "samples.linhtruong.com.ui_reactive_rxjava_realm"
minSdkVersion versions.minSdk
@natchiketa
natchiketa / a Super-simple Nginx reverse proxy with Homebrew on OS X.md
Last active May 18, 2023 04:54
Super-simple Nginx reverse proxy with Homebrew on OS X

Installation

1)

brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents

2)

Replace /usr/local/etc/nginx/nginx.conf with the nginx.conf in this gist. I'm using port 5000 for my current project. Obviously, change server_name as well, and probably the name of its access log.

@ef2k
ef2k / pf_and_dns.markdown
Last active January 22, 2021 02:42
Port Forwarding and Domain Tricks (macOS High Sierra)

This guide enables port forwarding for foo.com to localhost:3000. Tested on macOS High Sierra.

Add the domain to /etc/hosts

$ sudo nvim /etc/hosts

Add the following:

package com.firebase.utils;
import java.util.Date;
/**
* Fancy ID generator that creates 20-character string identifiers with the
* following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't
@rxaviers
rxaviers / gist:7360908
Last active May 4, 2024 00:48
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: