Skip to content

Instantly share code, notes, and snippets.

:bowtie:
-

Kishan Vaghela Kishanjvaghela

:bowtie:
-
Block or report user

Report or block Kishanjvaghela

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Kishanjvaghela
Kishanjvaghela / ExamplePeopleAdapter.java
Last active Mar 26, 2020
Custom Filterable FirebaseRecyclerAdapter
View ExamplePeopleAdapter.java
import android.databinding.DataBindingUtil;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.app.wanna.android.R;
import com.app.wanna.android.data.User;
import com.app.wanna.android.databinding.LayoutItemPeopleBinding;
import com.app.wanna.android.utils.firebaseadapter.FirebaseRecyclerAdapter;
@Kishanjvaghela
Kishanjvaghela / converter.sh
Last active Feb 20, 2020
Create Image drawable for all resolutions
View converter.sh
if [ $# -eq 0 ]; then
echo "No arguments supplied"
else if [ -f "$1" ]; then
echo " Creating different dimensions (dips) of "$1" ..."
mkdir -p drawable-xxhdpi
mkdir -p drawable-xhdpi
mkdir -p drawable-hdpi
mkdir -p drawable-mdpi
if [ $1 = "ic_launcher.png" ]; then
@Kishanjvaghela
Kishanjvaghela / CustomDatePickerDialog.java
Last active Feb 11, 2020
Set maximum date in DatePicker dialog
View CustomDatePickerDialog.java
import android.app.DatePickerDialog;
import android.content.Context;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.DatePicker;
import java.util.Calendar;
import jp.likenote.android.R;
@Kishanjvaghela
Kishanjvaghela / start_emulator.sh
Created Aug 21, 2019 — forked from itmammoth/start_emulator.sh
Start an android emulator with changing DNS server to Google public DNS
View start_emulator.sh
#!/bin/bash
EMULATOR=~/Library/Android/sdk/tools/emulator
if [ $# -ne 1 ]; then
echo "ERROR: Please specify the target AVD from the list below" 1>&2
$EMULATOR -list-avds 1>&2
exit 1
fi
$EMULATOR -avd $1 -dns-server "8.8.8.8,8.8.4.4"
@Kishanjvaghela
Kishanjvaghela / rn-cli.config.js
Created Jun 20, 2019
transformer for node modules
View rn-cli.config.js
module.exports = {
/**
* Add search paths to the packager. Equivalent to the
* `--projectRoots` command line argument.
*
* Your app project directory is the default, but you can easily add
* additional directories.
*
* This is very handy when you maintain all your software in one big
View romanToNumber
function convertToRoman(input) {
var roman = {
M: 1000,
D: 500,
C: 100,
L: 50,
X: 10,
V: 5,
I: 1
};
View Generator_Iterator.js
function *foo(x) {
console.log('x is ' + x);
const y = yield (x + 1);
console.log('y is ' + y);
var z = yield (y + 2);
console.log('z is '+ z);
return (x + y + z);
}
var it = foo( 5 );
@Kishanjvaghela
Kishanjvaghela / TLSSocketFactory.java
Last active Nov 20, 2018 — forked from fkrauthan/TLSSocketFactory.java
Custom SSLSocketFactory Implementation to enable tls 1.1 and tls 1.2 for android 4.1 (16+)
View TLSSocketFactory.java
package net.cogindo.ssl;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
View kaybase.md

Keybase proof

I hereby claim:

  • I am kishanjvaghela on github.
  • I am kishanjv (https://keybase.io/kishanjv) on keybase.
  • I have a public key ASB3nyeRTfEhgvPClo87yNP0zm9UbEJJ2b3_SKWJxKrplwo

To claim this, I am signing this object:

@Kishanjvaghela
Kishanjvaghela / gradle.md
Last active Sep 29, 2018 — forked from suwhs/gradle.md
5 steps for bintray-upload build.gradle (for jcenter)
View gradle.md

add bintray and maven plugin to buildscript dependencies (project's build.gradle)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.2'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'            // ADD THIS LINE
You can’t perform that action at this time.