Skip to content

Instantly share code, notes, and snippets.


Firoze Rakib firoze

  • Fieldwire
  • San Francisco
  • Twitter @frzrkb
View GitHub Profile
firoze / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
firoze / jenkins_android_gradle_buildNum
Last active Jun 13, 2021
[Android Gradle] Auto-Increment version code/name in AndroidManifest/Gradle before Jenkins Build
View jenkins_android_gradle_buildNum
import java.util.regex.Pattern
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
buildscript {
repositories {
firoze / AsyncGetLocationForStoreTask
Created Dec 11, 2014
AsyncTask that gets Lat/Long using Geocoder first, otherwise makes HTTP call to Google Geocoding API to do the same (inspired by @kentarosu)
View AsyncGetLocationForStoreTask
class AsyncGetLocationForStoreTask extends AsyncTask<String, Integer, Location> {
private ProgressDialog pDialog;
private String str;
public AsyncGetLocationForStoreTask(String s) {
str = s;
View git-loglive
while :
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
View gist:f1fa582000ecd817547c
uitiesoftheself ishandth
etyrannyofevi lmen.Bl
essedishewho,in thenam
eofcharityandgoo dwill
,shepherdst heweak throughthev alley
ofdarkness,forheist rulyhisbrother' skee
perandthefinderof lostchildren.AndIwill
firoze / java_sha1
Created Jan 15, 2015
SHA1 Some String in Java
View java_sha1
public class HashTextTest {
* @param args
* @throws NoSuchAlgorithmException
public static void main(String[] args) throws NoSuchAlgorithmException {
firoze / instaService
Last active Aug 29, 2015
Cordova Instagram wrapper
View instaService
angular.module("ycf").factory("ycfInstagram", function($q, social, groupVerification, loadingDialog, validationAlert, $ionicPopup) {
var insta = {};
insta.msg = "Support my YC Fundraiser!"; = function(type) {
if (type == "marketing") {
} else {
return insta.invite();
View delay.promise.js
function delay(t){
return new Promise(function(resolve){
return setTimeout(resolve, t);
function logHi(){
firoze / OkHttpIdlingResource.kt
Created Jan 28, 2020
OkHttpIdlingResource in Kotlin
View OkHttpIdlingResource.kt
import androidx.annotation.CheckResult
import androidx.annotation.NonNull
import androidx.test.espresso.IdlingResource
import okhttp3.Dispatcher
import okhttp3.OkHttpClient
class OkHttpIdlingResource private constructor(
private val resourceName: String, private val dispatcher: Dispatcher
) : IdlingResource {
companion object {