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
#!/bin/bash | |
#--------------------------------------------------------------- | |
# Create a virtual host automatically with host name and | |
# document root send by parameter | |
# | |
# SYNTAX: | |
# sudo script_name HOST_NAME DOCUMENT_ROOT | |
# | |
# EXAMPLE: |
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
<!-- required CSS Files --> | |
<link href="views/css/bootstrap_3/bootstrap.css" rel="stylesheet" type="text/css" media="screen"/> | |
<link href="views/css/bootstrap_3/date-picker/daterangepicker.css" rel="stylesheet" type="text/css" media="screen"/> | |
<link href="views/css/bootstrap_3/date-picker/datetimepicker.css" rel="stylesheet" type="text/css" media="screen"/> | |
<!-- required JS libraries --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript" src="views/js/bootstrap_3/bootstrap.min.js"></script> | |
<script type="text/javascript" src="views/js/bootstrap_3/date-picker/moment.min.js"></script> | |
<script type="text/javascript" src="views/js/bootstrap_3/date-picker/daterangepicker.js"></script> |
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
Step 1: Remove lock file. | |
sudo rm /var/lib/mongodb/mongod.lock | |
Step 2: Repair mongodb. | |
mongod --repair | |
Step 3: start mongodb. | |
sudo start mongodb | |
or | |
sudo service mongodb start |
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", |
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
### 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
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
# --------------------------------------------------------------------------- | |
# | |
# 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
#!/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
function render (templateName, data) { | |
//Configuration variable for Template | |
_.templateSettings.variable = "data"; | |
var template = _.template(templateName); | |
return template(data); | |
} | |
render(Templates.sidebar, {'content' : 'YOUR_CONTENT'}; |
OlderNewer