Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<script type="text/javascript">
var guessingGame = function() {
var guess, answer, difference;
answer = 13;
guess = prompt("How many stripes on the US Flag?");
@jfall76
jfall76 / GameObject.html
Created June 11, 2014 19:18
GameObject.html
<!DOCTYPE html>
<script type="text/javascript">
function Guess(guess, tries) {
this.guess = guess;
this.tries = tries;
this.message
this.answer = false;
this.run = function() {
@jfall76
jfall76 / deckOfCards.html
Last active August 29, 2015 14:02
DeckofCards
<script>
//
// Simple Game where each player throws down the top card on their deck after it's been delt. Who ever has the
// higher ranked card value gets a point. If it's a tie, no one gets a point. Whoever has the most points at the
// end of the game, wins.
//
//
function Queue() {
this.queue = [];
@jfall76
jfall76 / lists.txt
Created August 5, 2014 16:11
Output of Gruntfile.js
[4mRunning "simplemocha:all" (simplemocha) task
1..1
ok 1 Array indexOf() should return -1 when the value is not present
# tests 1
# pass 1
# fail 0
[32mDone, without errors.[39m
@jfall76
jfall76 / palTest.js
Last active August 29, 2015 14:05
PalindromeTest
//var reverse = require('../app/reverse');
var pal = require('../app/pal');
var expect = require('chai').expect;
describe('palindrome', function() {
it('it is a palindrome', function() {
expect(pal('racecar')).to.be.true;
});
});
@jfall76
jfall76 / markdown.js
Created August 13, 2014 17:09
code that takes either a file or string formatted in markdown
var parser = require('node-markdown');
var fs = require('fs');
var argv = require('optimist').argv;
var file = argv._[0];
var markdown = fs.readFileSync(file, 'UTF-8');
//markdown passed in as a file
markdown = parser.Markdown(markdown);
@jfall76
jfall76 / testmarkdown.md
Last active August 29, 2015 14:05
input markdown file

h3. Traditional html title

Paragraphs are separated by a blank line.

Let 2 spaces at the end of a line to do a
line break

Text attributes italic, bold, monospace.

@jfall76
jfall76 / output.html
Created August 13, 2014 17:14
Our output after our markdown.js file converts our markdown into html
Output from our markdown file:
<p>h3. Traditional html title</p>
<p>Paragraphs are separated
by a blank line.</p>
<p>Let 2 spaces at the end of a line to do a <br />
line break</p>
<p>Text attributes <em>italic</em>,
<div data-ng-controller="notesController">
<h1>Input page</h1>
<p>noteBody</p>
<input type="text" data-ng-model="newNote.noteBody">
<p>name</p>
<input type="text" data-ng-model="newNote.name">
<p>course</p>
<input type="text" data-ng-model="newNote.course">
<div data-ng-controller="taController">
<h1>Input page</h1>
<div data-ng-repeat="note in notes">
<p>
<div data-ng-show="note.editing">
Name:{{note.name}}</br>
NoteBody:<input data-ng-model="note.noteBody"/>