Skip to content

Instantly share code, notes, and snippets.

Shahbaz Hussain therealshabi

Block or report user

Report or block therealshabi

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
therealshabi /
Created Mar 22, 2020
File Utility to resolve real path
public class FileUtils {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 19) {
realPath = FileUtils.getRealPathFromURI_API11to18(context, fileUri);
// SDK > 19 (Android 4.4) and up
else {
realPath = FileUtils.getRealPathFromURI_API19(context, fileUri);
git filter-branch --env-filter '
CORRECT_NAME="Your Correct Name"
therealshabi / CrashlyticsTree.kt
Created Jul 24, 2019
Log Error Stacktrace into Crashlytics in addition to logging into the Logcat
View CrashlyticsTree.kt
package com.example.shahbaz
import android.util.Log
import timber.log.Timber
class CrashlyticsTree : Timber.DebugTree() {
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
super.log(priority, tag, message, t)
if (priority != Log.ERROR) return
View index.html
<!DOCTYPE html>
<title>Pixel Art Maker!</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="styles.css">
<script src=""></script>
<h1>Lab: Pixel Art Maker</h1>
therealshabi / index.html
Last active Feb 25, 2018
Udacity Animal Trading Card
View index.html
<meta charset="utf-8">
<title>Animal Trading Cards</title>
<link rel="stylesheet" href="styles.css">
<div id="container-div">
<!-- your favorite animal's name goes here -->
<h3>The Royal Bengal Tiger</h3>
therealshabi / AsyncRoute.js
Created May 4, 2017
How to make Asynchronous Route in nodejs
View AsyncRoute.js
var calls = [];
// HomeStreamPost Part-2
// route to get the homeStream post of a particular user
var result=[];
req.assert('email_address','Email Address is required').notEmpty().isEmail();
var errors = req.validationErrors();
if (errors) {
import java.util.*;
public class Testing
public static void main(String args[])
Scanner in = new Scanner(;
String password = in.nextLine();
String key =;
int i;
View 1-restify-server-cheatsheet.js
// Restify Server CheatSheet.
// More about the API:
// Install restify with npm install restify
// 1.1. Creating a Server.
var restify = require('restify');
therealshabi /
Created Sep 28, 2016
Crawling the Amazon Website
from bs4 import BeautifulSoup
import requests
import urllib
def titles():
url = ""
source_code = requests.get(url) # Getting Source Code of the given URL
plain_text = source_code.text
You can’t perform that action at this time.