Skip to content

Instantly share code, notes, and snippets.

@aakashns
aakashns / gmid.py
Created November 30, 2015 05:18
Simple command script to download and add Google Material Design Icons ( https://www.google.com/design/icons/ ) to to your Android project
#! /usr/bin/env python
# Simple command script to download and add Google Material
# Design Icons ( https://www.google.com/design/icons/ ) to
# to your Android project.
# 'gmid' stands for 'Google Material Icons Downloader'
import sys
import os
@aakashns
aakashns / apk_decompiler.py
Created January 19, 2016 17:42
Script to download and decompile an apk using just the package name.
import requests
from bs4 import BeautifulSoup
from subprocess import call
import sys
# Script to download and decompile an apk using the package name.
# Install the jadx decompiler before running this.
#
# JADX installation :
# $ git clone https://github.com/skylot/jadx.git

Keybase proof

I hereby claim:

  • I am aakashns on github.
  • I am aakashns (https://keybase.io/aakashns) on keybase.
  • I have a public key whose fingerprint is 3E0D D672 AA31 F260 B8EE A17B A8DD A142 719A 26A9

To claim this, I am signing this object:

@aakashns
aakashns / commands
Last active May 24, 2016 15:41
Building an Audio Streaming Player in React Native
$ npm install react-native-cli@latest
$ react-native init ReactMusic
@aakashns
aakashns / App.jsx
Last active May 25, 2016 06:09
Starting App.js
import React, { Component } from 'react';
import {
View,
Text,
} from 'react-native';
export default class App extends Component {
render() {
return (
@aakashns
aakashns / 00_FirebaseAccountKit.java
Last active November 4, 2016 01:06
Helper class to connect Facebook's AccountKit with Firebase to create OTP (SMS) based login flow on Android
package in.swiftace.firekit;
import android.content.Intent;
import android.os.AsyncTask;
import android.support.annotation.NonNull;
import com.facebook.accountkit.AccountKitLoginResult;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.AuthResult;
@aakashns
aakashns / JsonConverterFactory.java
Created November 7, 2016 06:38
Custom Converter Factory for Retrofit 2 ( https://square.github.io/retrofit/ ) to convert the ResponseBody to a JSONObject.
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import okhttp3.ResponseBody;
import retrofit2.Converter;
import retrofit2.Retrofit;
@aakashns
aakashns / PermissionHandler.java
Created November 27, 2016 17:31
Utility class to assist with requesting permissions at run time on Android.
import android.content.pm.PackageManager;
import android.os.Build;
/**
* {@link PermissionHandler} provides a simple API to request Android permissions
* at runtime. The class exposes one static method: {@link #request} which the
* requesting activity should call to request or check for permission. The requesting
* activity must implement {@link PermissionActivity}.
*/
public class PermissionHandler {

Keybase proof

I hereby claim:

  • I am aakashns on github.
  • I am aakashns (https://keybase.io/aakashns) on keybase.
  • I have a public key ASDJcqfR2DuLZOMPqSuNdaAmzsCTUMZxkAmBOS-AeMfdvgo

To claim this, I am signing this object:

@aakashns
aakashns / store.js
Last active March 22, 2017 16:36
Redux store for Firebase + Redux blog post.
import { createStore } from 'redux';
const reducer = (state = {}, action) => {
switch(action.type) {
case 'SET_MESSAGE':
return {
...state,
message: action.payload
};
// Handle other actions here