Skip to content

Instantly share code, notes, and snippets.

View sharif2008's full-sized avatar
🎯
Focusing

Md. Shariful Islam sharif2008

🎯
Focusing
  • Dhaka
View GitHub Profile
@sharif2008
sharif2008 / english_to_bangla.js
Last active January 27, 2023 04:00
Converting English number to Bangla in Javascript
var finalEnlishToBanglaNumber={'0':'০','1':'১','2':'২','3':'৩','4':'৪','5':'৫','6':'৬','7':'৭','8':'৮','9':'৯'};
String.prototype.getDigitBanglaFromEnglish = function() {
var retStr = this;
for (var x in finalEnlishToBanglaNumber) {
retStr = retStr.replace(new RegExp(x, 'g'), finalEnlishToBanglaNumber[x]);
}
return retStr;
};
@sharif2008
sharif2008 / getNcharacters.java
Last active May 6, 2016 07:59
Get a substring with N character in JAVA
public static final String getNcharacters(int n, String s){
if(s==null)
return "";
return s.substring(0, Math.min(s.length(), n));
}
@sharif2008
sharif2008 / GSONofMultipleArray.java
Created June 25, 2016 13:39
Get JSON response of multiple Array
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gsontest;
import java.util.ArrayList;
/**
@sharif2008
sharif2008 / includes
Last active June 26, 2016 10:15
JQuery Auto-Complete on Complex Javascript Object/JSON
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
@sharif2008
sharif2008 / bootsrap_class_list
Created October 2, 2016 05:35 — forked from geksilla/bootsrap_class_list
Bootstrap css class list
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
@sharif2008
sharif2008 / Draw 3 blocks of different height, place them side by side.html
Last active April 7, 2017 21:18
Draw 3 blocks of different height, place them side by side. Write some text in top center of first block, middle center of second block and bottom center of third block
<html>
<head>
<style type="text/css">
#container{
display: block;
}
.div1{
height: 300px;
max-height: 100%;
background-color: #36D7B7;
@sharif2008
sharif2008 / heroku_logs.md
Created April 6, 2018 13:38
Connection error on starting heroku (Node.js/Express + MongoLab)
@sharif2008
sharif2008 / stuns
Created June 1, 2018 11:20 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@sharif2008
sharif2008 / README.md
Created October 21, 2018 11:24 — forked from pcan/README.md
Node.js plain TLS Client & Server, 2-way Cert Auth

Node.js TLS plain TLS sockets

This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.

Prepare certificates

Generate a Certificate Authority:

openssl req -new -x509 -days 9999 -keyout ca-key.pem -out ca-crt.pem
@sharif2008
sharif2008 / clean_code.md
Created September 22, 2019 03:46 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules