Skip to content

Instantly share code, notes, and snippets.

View mhasby's full-sized avatar

Muhammad Hasby mhasby

View GitHub Profile
@mhasby
mhasby / twitter_streaming.js
Created September 19, 2012 06:58 — forked from ryanmcgrath/twitter_streaming.js
Access the Twitter Streaming API with ease (Node.js).
var util = require('util'),
http = require('http'),
events = require('events');
var Twitter = function(opts) {
this.username = opts.username;
this.password = opts.password;
this.track = opts.track;
this.data = '';
};
@mhasby
mhasby / CopyAssets.java
Created November 15, 2016 07:06
[ANDROID] copy files from 'assets' folder to sdcard
import android.content.Context;
import android.content.res.AssetManager;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@mhasby
mhasby / CustomNavigationView.java
Created March 3, 2018 11:08
Android Custom Bottom Navigation Bar (Colored Icon)
package app.custom.view;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.v7.widget.PopupMenu;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;