Skip to content

Instantly share code, notes, and snippets.

View mdsahib's full-sized avatar

Mohammad Sahib Bin Mahboob mdsahib

  • Dhaka , Bangladesh
View GitHub Profile
@mdsahib
mdsahib / generator.js
Created January 30, 2018 09:00
Data generator
var faker = require('faker');
var needle = require('needle');
var contentOptions = ["CORRECT","MISSING_MINIMAL_DETAILS",
"MISSING_CRITICAL_DETAILS","NOT_ADDRESSED"
];
var skillOptions = ["NOT_ADDRESSED", "NEVER", "CONSISTENTLY", "INCONSISTENTLY" ];
var complaintOptions = [
@mdsahib
mdsahib / Main.java
Last active August 29, 2015 14:15
HelpInOutput.java
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
public class Main {
private String getMessage() {
String teamEscenicName = "Escenic Asia Ltd.";
@mdsahib
mdsahib / gist:ecdbe7dd520218b56d1d
Created November 28, 2014 04:44
Jquery Validation Engine : Validated hooks usage
$("#insertYourFormIdHere").bind("jqv.form.result", function(event, errorFound) {
if(!errorFound){
console.log("There is a problem with your form");
iAmValidated();
}
});
@mdsahib
mdsahib / localstorage
Created February 7, 2014 04:32
Usage of localstorage
$('.buttonClass').click(fucntion(event){
var id = $(this).data('id');
if(isNotAlreadyClicked(id))
doSomething();
else doDifferentThing();
});
fucntion isNotAlreadeyClicked(id){
if(window.localstorage[id] === true)
fdsfkds;lfk;dsl
@mdsahib
mdsahib / .htacces
Created April 27, 2013 06:41
Appcache problem with android build with phonegap build
AddType text/cache-manifest .appcache
App.module("FooModule.Bar", {
startWithApp: false,
define: function() {
// Code of submodule
}
});
<iframe width="480" height="302" src="http://www.ustream.tv/embed/13202706?v=3&amp;wmode=direct" scrolling="no" frameborder="0" style="border: 0px none transparent;"> </iframe>
<br /><a href="http://www.ustream.tv/" style="padding: 2px 0px 4px; width: 400px; background: #ffffff; display: block; color: #000000; font-weight: normal; font-size: 10px; text-decoration: underline; text-align: center;" target="_blank">Video streaming by Ustream</a>
@mdsahib
mdsahib / array_value_checking
Created November 12, 2012 19:10
Shorthand to check value in array
<?php
//this array maps the function with the get parameters
$functions = array (
"action" => "do_actions" ,
"filter" => "do_filters"
);
foreach ($_GET as $key=>$value) {
@mdsahib
mdsahib / tree.php
Created November 11, 2012 23:13
Generating category tree as HTML unordered list
<?php
//error_reporting (0);
$arr = array
(
0=> array
(
'id' => 1,
'parent' => 0,
'status' => 2,
'slug' => 'clothes',