Skip to content

Instantly share code, notes, and snippets.

View WSAyan's full-sized avatar
🎯
Focusing

Wahid Sadique Ayan WSAyan

🎯
Focusing
  • Wind.app
  • Dhaka,Bangladesh
  • LinkedIn in/wsayan
View GitHub Profile
@WSAyan
WSAyan / gist:d19eef79c77ca9f9462f0a8adfa03561
Created November 13, 2017 08:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@WSAyan
WSAyan / Contributing.md
Created January 23, 2018 05:55 — forked from MarcDiethelm/Contributing.md
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@WSAyan
WSAyan / HttpStatusCodes.java
Last active March 23, 2019 07:12
Java class with all the HTTP Status Codes.
/**
* Created by wahid.sadique on 5/5/2018.
*/
public final class HttpStatusCodes {
public static final int CONTINUE = 100;
public static final int SWITCHING_PROTOCOLS = 101;
public static final int PROCESSING = 102;
public static final int OK = 200;
@WSAyan
WSAyan / bd_location_arrays.xml
Last active August 2, 2021 18:34
BD divisions and districts string array list for android array values.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="bd_divisions">
<item>Dhaka</item>
<item>Chattogram</item>
<item>Barishal</item>
<item>Khulna</item>
<item>Rajshahi</item>
<item>Rangpur</item>
<item>Sylhet</item>
@WSAyan
WSAyan / rename.sh
Created April 25, 2020 20:08
Rename all files with ascending number in a directory
# rename all files with ascending number in a directory
# sh rename.sh -e [extension] -f [first number] -name [optinal name in first]
_ext=""
_first=0
_name=""
while getopts ":e:o:f:n:" opt; do
case $opt in
e)
_ext="$OPTARG"
@WSAyan
WSAyan / extract-img.sh
Created May 27, 2020 04:22
extracts images from all video files in a directory using ffmpeg
# extract images from video file
# sh extract-img.sh -e [extension] -fr [frame rate]
_ext=""
_fr=1
while getopts ":e:o:f:n:" opt; do
case $opt in
e)
_ext="$OPTARG"
;;
@WSAyan
WSAyan / ImageSpannedTextView.kt
Created August 9, 2020 10:44
Android TextView with inline images.
import android.content.Context
import android.text.Spannable
import android.text.style.ImageSpan
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView
import java.util.regex.Matcher
import java.util.regex.Pattern
class ImageSpannedTextView : AppCompatTextView {
constructor(
@WSAyan
WSAyan / CustomScrollableLinearLayoutManager.kt
Created August 16, 2020 05:54
Disable/enable default scrolling behavior of RecyclerView
import android.content.Context
import androidx.recyclerview.widget.LinearLayoutManager
class CustomScrollableLinearLayoutManager(context: Context) : LinearLayoutManager(context) {
private var isVerticalScrollEnabled = true
private var isHorizontalScrollEnabled = true
fun setVerticalScrollEnabled(isVerticalScrollEnabled: Boolean) {
this.isVerticalScrollEnabled = isVerticalScrollEnabled
}
@WSAyan
WSAyan / CustomScrollableRecyclerView.kt
Created August 16, 2020 05:55
Custom RecyclerView with disable touch option.
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.annotation.Nullable
import androidx.recyclerview.widget.RecyclerView
class CustomScrollableRecyclerView : RecyclerView {
private var isVerticalScrollingEnabled = true
@WSAyan
WSAyan / TaxCalculationCore.java
Created November 22, 2020 17:22
NBR tax calculation for year 2017-18.
public class TaxCalculationCore {
public static final String GENDER_MALE = "_male";
public static final String GENDER_FEMALE = "_female";
private static final int BASIC_PERCENTAGE = 60;
private static final int HOUSE_RENT_PERCENTAGE = 30;
private static final int CONVEYANCE_ALLOWANCE_PERCENTAGE = 4;
private static final int MEDICAL_ALLOWANCE_PERCENTAGE = 6;
private static final int HOUSE_RENT_DEDUCTABLE = 25000;
private static final int CONVEYANCE_ALLOWANCE_DEDUCTABLE = 2500;