Skip to content

Instantly share code, notes, and snippets.

View hossain-khan's full-sized avatar
🙈
Just do it!

Hossain Khan hossain-khan

🙈
Just do it!
View GitHub Profile
@hossain-khan
hossain-khan / kml-to-android-maps-v2.php
Last active July 19, 2019 09:26
Snippet for parsing KML file and then converting to polygon shapes of Android Google Maps V2
<?php
/**
* Dirty way to parse the KML file and create equivalent polygons for android maps V2
*
* What it does:
* - Reads local KML file and looks for "Polygon" data, and converts them
* to equivalent simple polygon data for Android Maps V2
*
* What it does NOT do / Limitations:
* - Consider all possible DOM tree structure
#!/bin/sh
################################################
#
# Backup SVN repos to local folder
#
# @author Hossain Khan
# @email contact [at] hossainkhan [dot] info
# @version v0.01
# @reldate 2010-03-27
################################################
@hossain-khan
hossain-khan / chromecast-config.json
Last active January 3, 2016 21:59 — forked from nathanjones/chromecast-config.json
Updated list based as on January 20, 2014
{
"applications": [
{
"use_channel": true,
"allow_empty_post_data": true,
"app_name": "edaded98-5119-4c8a-afc1-de722da03562",
"url": "http://chromecast.redbull.tv/receiver.php"
},
{
'use strict';var cr$,cr$a=this,cr$aa=function(a){a=a.split(".");for(var b=cr$a,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b},cr$ba=function(){throw Error("unimplemented abstract method");},cr$b=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&
!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},cr$ca=function(a){var b=cr$b(a);return"array"==b||"object"==b&&"number"==typeof a.length},cr$c=function(a){return"string"==typeof a},cr$da=function(a){var b=typeof a;return"object"==b&&null!=a||"function
2014-03-26 09:02:32
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):
"forward input" daemon prio=4 tid=0x00000000139d9000 nid=0x30e78 waiting on condition [0x0000000014f5e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000bcb60008> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
@hossain-khan
hossain-khan / 01_idea-gradle-build-in-progress-before-frozen.txt
Created March 26, 2014 14:57
This is second try to generate Android Studio thread dump for the issue found at https://plus.google.com/+ashokraju/posts/1CJSqaX1Xxy
2014-03-26 10:50:30
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):
"JobScheduler FJ pool 0/4" daemon prio=6 tid=0x000000001855f800 nid=0x35458 waiting on condition [0x000000001bbff000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000cf421118> (a jsr166e.ForkJoinPool)
at jsr166e.ForkJoinPool.awaitWork(ForkJoinPool.java:1756)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1694)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
@hossain-khan
hossain-khan / json-resume-themes.txt
Created December 31, 2015 16:14
JSON Resume Theme list
#inline
jsonresume-theme-sceptile jsonresume-theme-elegant-ryantrinkle jsonresume-theme-classy jsonresume-theme-dark-classy jsonresume-theme-dark-classy-responsive jsonresume-theme-modern jsonresume-theme-contempo jsonresume-theme-nameme jsonresume-theme-kwan jsonresume-theme-elegant-tautologistics jsonresume-theme-bootstrap-icons jsonresume-theme-qlh jsonresume-theme-elegant-fr jsonresume-theme-wb-elegant jsonresume-theme-modern-extended jsonresume-theme-elegant-tarq jsonresume-theme-compact-extended jsonresume-theme-compact jsonresume-theme-striking jsonresume-theme-kendall-beardtree
#newline
jsonresume-theme-sceptile
jsonresume-theme-elegant-ryantrinkle
jsonresume-theme-classy
jsonresume-theme-dark-classy
jsonresume-theme-dark-classy-responsive
jsonresume-theme-modern
@hossain-khan
hossain-khan / keybase.mb
Created May 14, 2016 15:15
Keybase identity proff
### Keybase proof
I hereby claim:
* I am amardeshbd on github.
* I am hossainkhan (https://keybase.io/hossainkhan) on keybase.
* I have a public key ASAHC_7nTgLPCysHlkmwnIH_25aD_Ah-jtCfZ2yQp8iI3Qo
To claim this, I am signing this object:
@hossain-khan
hossain-khan / ApiClient.java
Last active August 23, 2016 02:17
Source Code for ApiClient.java - generated using swagger code gen tool. It uses Retrofit2 Java client library. NOTE: This file has slight modification to fix an issue detailed at https://github.com/amardeshbd/medium-api-android-sample
package io.swagger.client;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
@hossain-khan
hossain-khan / RoundedTransformation.java
Created July 25, 2016 19:19 — forked from aprock/RoundedTransformation.java
Rounded Corner Image Transformation for square's Picasso
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.graphics.Shader;
/**