Skip to content

Instantly share code, notes, and snippets.

Md Mahabubul Hasan Masud masudiiuc

Block or report user

Report or block masudiiuc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@masudiiuc
masudiiuc / eventListener.js
Created Jun 2, 2016
Add listener to dispatch events
View eventListener.js
var utitlity = (function(){
'use strict';
var observerList = [];
var observe = function (eventName, eventMethod) {
observerList[eventName] = eventMethod;
};
var dispatch = function (eventName, eventParams){
eventParams = eventParams || '';
@masudiiuc
masudiiuc / app.js
Last active Oct 7, 2015
Write a simple TodoList using AngularJS
View app.js
'use strict';
var todoAppliction = angular.module("todoApp",[]);
todoAppliction.controller("todoController", todoController);
todoController.$inject =['$scope'];
/**
* Processs an input box enter event
* Ex: on enter add the task in the list
View git-profile
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
@masudiiuc
masudiiuc / Render.js
Created Jul 31, 2015
Rendering Template
View Render.js
function render (templateName, data) {
//Configuration variable for Template
_.templateSettings.variable = "data";
var template = _.template(templateName);
return template(data);
}
render(Templates.sidebar, {'content' : 'YOUR_CONTENT'};
View html2js.php
#!/usr/bin/env php
<?php
function bundleHtml($file)
{
$html = file_get_contents($file);
$html = str_replace(array("\r\n", "\n", "\r"), " ", $html);
$html = str_replace("'", "\\'", $html);
$html = preg_replace("/\s+/", " ", $html);
return $html;
}
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@masudiiuc
masudiiuc / Git and Git-flow learning resources
Created Feb 23, 2015
Git and Git-flow learning resources
View Git and Git-flow learning resources
Git introduction in place of SVN in Granbury Solutions
SVN is going to be replaced with Git (based on Bitbucket) from 28th Feb, 2015. So its better if every try Git from now as a test basis. To get start with Git, create an account in Bitbucket and create your own repository and start working with that one.
Git Client for Cross platform users:
====================================
1. SmartGit -> Windows/Linux/Mac (Best) http://www.syntevo.com/smartgit/early-access?referrer=program&edition=foundation
2. TortaigeGit -> Windows
3. sourceTree -> Mac users
@masudiiuc
masudiiuc / gist:bb5056b263aace3fd772
Created Jan 7, 2015
Monitor all you Sql Instances Backups from One Location
View gist:bb5056b263aace3fd772
### Code that can be used to Monitor all you Sql Instances Backups from One Location
#Create a new Excel object using COM
$ErrorActionPreference = “silentlycontinue”
$Excel = New-Object -ComObject Excel.Application
$Excel.visible = $False
@masudiiuc
masudiiuc / GmapUtility.1.1.1.js
Last active Aug 29, 2015
Google Map distance calculation using direction service
View GmapUtility.1.1.1.js
/**
* Google Map distance calculation using direction service
*
* @author M.M.H.Masud<masudiiuc@gmail.com>
* @date 28th Oct, 2014
* @url https://developers.google.com/maps/documentation/javascript/directions
*
* @todo
* 1. set "optimizewaypoints" to get best directions and best route
* 2. set "unitSystem" for geting distance in Mile or Kilometers
View translation_notes
Note: I've left some of the full package names in tact to show exactly where the class comes from.
#### Pull dependencies in using composer ####
//Example composer.json
{
"require": {
"symfony/config" : "2.1.0",
"symfony/yaml" : "2.1.0",
"twig/twig": "1.9.0",
You can’t perform that action at this time.