This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var utitlity = (function(){ | |
'use strict'; | |
var observerList = []; | |
var observe = function (eventName, eventMethod) { | |
observerList[eventName] = eventMethod; | |
}; | |
var dispatch = function (eventName, eventParams){ | |
eventParams = eventParams || ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render (templateName, data) { | |
//Configuration variable for Template | |
_.templateSettings.variable = "data"; | |
var template = _.template(templateName); | |
return template(data); | |
} | |
render(Templates.sidebar, {'content' : 'YOUR_CONTENT'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
NewerOlder