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
# NERDTree | |
o.......Open files, directories and bookmarks....................|NERDTree-o| | |
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| | |
t.......Open selected node/bookmark in a new tab.................|NERDTree-t| | |
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| | |
i.......Open selected file in a split window.....................|NERDTree-i| | |
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| | |
s.......Open selected file in a new vsplit.......................|NERDTree-s| | |
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| | |
O.......Recursively open the selected directory..................|NERDTree-O| |
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
#Cursor movement | |
h - move left | |
j - move down | |
k - move up | |
l - move right | |
ctrl-b - page up | |
ctrl-f - page down | |
% - jump to matching brace | |
w - jump by start of words (punctuation considered words) |
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
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |
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 webdriver = require('selenium-webdriver'); | |
var driver = new webdriver.Builder(). | |
withCapabilities(webdriver.Capabilities.phantomjs()). | |
build(); | |
driver.get('http://www.duckduckgo.com'); | |
driver.findElement(webdriver.By.id('search_form_input_homepage')).sendKeys('nodejs'); | |
driver.findElement(webdriver.By.id('search_button_homepage')).click(); | |
var g = driver.getCurrentUrl(); | |
g.then(function(u) { | |
console.log("URL is: " + u); |
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 bookmarkPage(url,title) { | |
if (!url) {url = window.location} | |
if (!title) {title = document.title} | |
var browser=navigator.userAgent.toLowerCase(); | |
if (window.sidebar) { // Mozilla, Firefox, Netscape | |
window.sidebar.addPanel(title, url,""); | |
} else if( window.external) { // IE or chrome | |
if (browser.indexOf('chrome')==-1){ // ie | |
window.external.AddFavorite( url, title); | |
} else { // chrome |
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
/** | |
* Created By: Shane Reaume | |
* Date: 12/17/12 | |
* Time: 10:20 AM | |
*/ | |
/* form filters -Shane */ | |
$(function() { | |
var yourFacilityinput = $('label:contains("Your Facility")').parent('div').find('input'); |
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($){ | |
$('form.ProductReviewForm').attr('action', '') | |
.attr('method', ''); | |
$(".demo").remove(); | |
$(document).ready(function() { | |
$('#TopMenu').css({ | |
'border-radius':'0 0 5px 5px' | |
,'box-shadow':'2px 2px 3px #999999' | |
}); | |
$('#Menu').css({ |
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
<?php | |
$e1 = 1; | |
$e2 = $e1; | |
$e3 = --$e2; | |
while ($e1 <= $counting) { | |
echo "myChart.setLabelX([".$e1.",'".$e1++."']);"; | |
} | |
while( $e2 <= $counting ) { | |
$value = $teststring[$e3++]; |
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 phonenumber($value) | |
{ | |
$areacode = '[2-9]{1}\d{1}\d{1}'; // You might want to specify '2\d\d' (200 to 299) | |
$prefix = '[2-9]{1}\d{1}\d{1}'; | |
$regex = '#^(\('.$areacode.'\)|'.$areacode.')[\s\.-]?'.$prefix.'[\.-]?\d{4}$#'; | |
if (preg_match($regex, $value)) | |
{ | |
// Number now is in a suitable format | |
// extract digits -- remove this section to not test repeated pattern |
NewerOlder