Skip to content

Instantly share code, notes, and snippets.

View ajharry69's full-sized avatar
🏠
Working from home

Orinda Harrison(Mitch) ajharry69

🏠
Working from home
View GitHub Profile
@ajharry69
ajharry69 / setting-up-multinode-elasticsearch-cluster-with-docker.md
Last active January 23, 2024 05:01
Setting up multinode Elasticsearch cluster with Docker

Setting up multinode Elasticsearch cluster with Docker

This Wiki demonstrates how to start a multinode elasticsearch cluster with docker from multiple hosts (servers).

For a smooth setup, please ensure your servers are configured as per elasticsearch instructions.

Requirements

  1. At least 2 (publicly) accessible servers.
  2. Docker installation on all the servers.
@ajharry69
ajharry69 / Navigation.kt
Created February 24, 2022 07:07
Android jetpack compose - design checkable navigation drawer
package co.ke.xently.feature.ui
import android.content.Context
import androidx.annotation.StringRes
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.Help
import androidx.compose.material.icons.filled.Person
@ajharry69
ajharry69 / DataBindingIdlingResource.java
Created August 1, 2020 13:02
Java implementation of DataBindingIdlingResource for instrument testing Android apps depending on databinding
import android.view.View;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.testing.FragmentScenario;
import androidx.test.core.app.ActivityScenario;
import androidx.test.espresso.IdlingResource;
@ajharry69
ajharry69 / HiltContainer.java
Created August 1, 2020 12:58
Java overloaded implementation of launchFragmentInHiltContainer
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.annotation.StyleRes;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
@ajharry69
ajharry69 / AndroidManifest.xml
Last active March 10, 2020 00:05
An explanation on how to implement a standard Android search interface with Fragment(s) in SingleActivity pattern. N/B: Some code snippets contains AndroidX's navigation component codes that might not be useful to your project(as you could be handling your fragment navigation differently)
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<application ...>
<!-- launchMode=singleTop is IMPORTANT to avoid relaunching MainActivity every time search is initiated -->
<activity
android:name=".MainActivity"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEARCH" />
@ajharry69
ajharry69 / gist:6366ee4250f30a2b2c4218b3b3f0f1ff
Created October 8, 2017 22:34 — forked from ptigas/gist:2820165
linked list implementation in python
class Node :
def __init__( self, data ) :
self.data = data
self.next = None
self.prev = None
class LinkedList :
def __init__( self ) :
self.head = None