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 / 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 / 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 / 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 / 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 / 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 / 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:
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class SqliteDatabseHandler extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
@WSAyan
WSAyan / SessionManager.java
Last active July 18, 2017 05:32
Android SharedPreferences helper class. (EX: Log In session)
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
/**
* Created by WS Ayan on 11/24/2015.
*/
public class SessionManager {
private static String LOG = SessionManager.class.getSimpleName();
@WSAyan
WSAyan / android_glowing_background.xml
Created April 22, 2017 06:09
Multi color glowing background for android
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:startColor="#81C784"
android:centerColor="#4CAF50"
android:endColor="#2E7D32"
android:type="linear"
android:angle="135"/>
</shape>
@WSAyan
WSAyan / ImageHelper.java
Last active April 21, 2017 18:18
Android rounded image shaper
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Bitmap.Config;
import android.graphics.PorterDuff.Mode;
public class ImageHelper {