Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nathan Mkaya nathanmkaya

🎯
Focusing
View GitHub Profile
@nathanmkaya
nathanmkaya / ImagePicker.java
Created May 11, 2021 — forked from Mariovc/ ImagePicker.java
Utility for picking an image from Gallery/Camera with Android Intents
View ImagePicker.java
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
View gist:c1c1dd95210929c01c3a1fcb20ec4e27
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
View Error
Executing tasks: [:demo:assembleDebug] in project C:\Users\Nathan Mkaya\AndroidStudioProjects\backbase-intro
> Task :demo:preBuild UP-TO-DATE
> Task :demo:preDebugBuild UP-TO-DATE
> Task :demo:compileDebugAidl NO-SOURCE
> Task :demo:checkDebugManifest UP-TO-DATE
> Task :demo:compileDebugRenderscript NO-SOURCE
> Task :demo:generateDebugBuildConfig UP-TO-DATE
> Task :demo:prepareLintJar UP-TO-DATE
> Task :demo:generateDebugSources UP-TO-DATE
View keybase.md

Keybase proof

I hereby claim:

  • I am nathanmkaya on github.
  • I am nathanmkaya (https://keybase.io/nathanmkaya) on keybase.
  • I have a public key ASB-am6MDA_ivzGFPOb-lcN27TNFKed9oxWGEhTNFeVUtAo

To claim this, I am signing this object:

@nathanmkaya
nathanmkaya / Subfolder to git repo.md
Created Jan 3, 2019 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
View Subfolder to git repo.md
@nathanmkaya
nathanmkaya / ca.md
Created Nov 1, 2018 — forked from soarez/ca.md
How to setup your own CA with OpenSSL
View ca.md

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

View jacoco.gradle
apply plugin: 'jacoco'
jacoco {
toolVersion = "$jacocoVersion"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
View layout.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/background_dark"
>
@nathanmkaya
nathanmkaya / Connectivity.java
Created Jun 13, 2017 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
View Connectivity.java
package com.emil.android.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
/**
* Check device's network connectivity and speed
* @author emil http://stackoverflow.com/users/220710/emil
@nathanmkaya
nathanmkaya / main.go
Created Sep 11, 2016 — forked from eduncan911/main.go
Go/Reading Console Inputs
View main.go
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {