Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am neweber on github.
  • I am neweber (https://keybase.io/neweber) on keybase.
  • I have a public key ASBFJQS00bOXMzkik5ug0_G1UDLQM-w-OtYAEQQEixMS2Qo

To claim this, I am signing this object:

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|

# shorthand for change to parent folder
.. (){
cd ..
}
# change directory to Sites folder
sites (){
cd /Users/$USER/Sites
}
@NEWeber
NEWeber / MacbOC.html
Created June 11, 2014 07:25
Macbeth Guessing Game with Object Constructor
<script>
function GuessIt (title, questions, numGuesses) {
this.title = title;
this.questions = questions;
this.guesses = numGuesses;
this.numQ = questions.length;
this.questionIndex = (Math.floor(Math.random() * this.numQ))
this.question = this.questions[this.questionIndex][0]
this.answer = this.questions[this.questionIndex][1]
}
<script>
var playIt
playIt = confirm("Welcome to the Macbeth Quiz! Do you want to play?");
if (playIt) {
alert("Great! Let's get started.");
alert("You've got three guesses to get the right answer. Let me get your question.");
var guessIt = function(qaIndex) {
//Here are the Questions and answers