Skip to content

Instantly share code, notes, and snippets.

Just do it!

Hossain Khan amardeshbd

Just do it!
Block or report user

Report or block amardeshbd

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
amardeshbd / livetemplate.groovy
Last active Sep 14, 2019
Kotlin - Timber Log Live Template
View livetemplate.groovy
Go to Android Studio Preferences
Editor > Live Template > Kotlin
Duplicate "soutp" and use following template for `$FORMAT`.
Applicable in kotlin statement (it should be pre-selected for you, since you copied `soutp`)
View express-simple-api.js
* Say hello API
* Try:
app.get('/say/hello', (req, res) => {
// Return success response
return res.status(200).json({"message":"Hello there... Welcome to mock server."});
/* [END `/say/hello` ] - must be added before `exports.api = ...` */
amardeshbd / express-and-firebase.js
Created Mar 13, 2019
Firebase and express barebone.
View express-and-firebase.js
'use strict';
// [START import]
const functions = require('firebase-functions');
const express = require('express');
const app = express();
// [END import]
// [START middleware]
const cors = require('cors')({origin: true});
amardeshbd /
Created Mar 13, 2019
Update npm modules
cd functions
npm install
cd ..
firebase use --add your-project-id-23d6x
amardeshbd /
Created Mar 13, 2019
Firebase list projects
View build.gradle.js
productFlavors {
dev {
// To avoid using legacy multidex, set minSdkVersion to 21 or higher.
minSdkVersion 21
// The following configuration limits the "dev" flavor to using
// English string resources and xxhdpi screen-density resources.
resConfigs "en", "xxxhdpi"
amardeshbd /
Last active Nov 19, 2019
Android Mock Shared Preference for unit testing. (NOTE: The intention here is to avoid mocking lots of API related to `SharedPreferences`, as outcome from interacting with `SharedPreferences` is not relevant in the unit test.). Please comment if there is a cleaner way of doing this.
import android.content.SharedPreferences;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
amardeshbd / travis-ci-build.yml
Last active Aug 28, 2016
Travis-CI build config file used for validating OpenAPI specification file. This file is taken from and **modified** for embedding on web, see github project for details.
View travis-ci-build.yml
language: bash
# Load the shUnit2 for running shell-script unit test
- curl -L "" | tar zx
# Get proper branch name based on
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
You can’t perform that action at this time.