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
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 com.crashlytics.android.Crashlytics
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>
<html>
<head>
<title>Pixel Art Maker!</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton">
<link rel="stylesheet" href="styles.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<body>
<h1>Lab: Pixel Art Maker</h1>
@therealshabi
therealshabi / index.html
Last active Feb 25, 2018
Udacity Animal Trading Card
View index.html
<html>
<head>
<meta charset="utf-8">
<title>Animal Trading Cards</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="container-div">
<!-- your favorite animal's name goes here -->
<h3>The Royal Bengal Tiger</h3>
@therealshabi
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
server.get("/user/homeStreamPost/:email_address",function(req,res,next){
var result=[];
req.assert('email_address','Email Address is required').notEmpty().isEmail();
var errors = req.validationErrors();
if (errors) {
helpers.failure(res,next,errors[0],400);
View PolyAlphabeticCipher.java
import java.util.*;
public class Testing
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
String password = in.nextLine();
String key = in.next();
int i;
View 1-restify-server-cheatsheet.js
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@therealshabi
therealshabi / crawl.py
Created Sep 28, 2016
Crawling the Amazon Website
View crawl.py
from bs4 import BeautifulSoup
import requests
import urllib
def titles():
url = "http://www.amazon.in/Smartphones/b/ref=dp_bc_4/254-3466076-7604721?ie=UTF8&node=1805560031"
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.