This file contains hidden or 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
| HUGE.cheat = { | |
| init: function(code) { | |
| HUGE.cheat[code].call(); | |
| }, | |
| monochrome: function() { | |
| $('head').append('<style> body { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: grayscale(100%); filter: gray; }</style>'); | |
| }, |
This file contains hidden or 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 ( $ ) { | |
| var i, j = 0; | |
| var matching = false; | |
| var secret = [ | |
| { | |
| cheat: 'monochrome', | |
| code: [77, 79, 78, 79, 67, 72, 82, 79, 77, 69] | |
| }, | |
| { |
This file contains hidden or 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 async = require('async'), | |
| request = require('supertest'), | |
| should = require('should'), | |
| app = require('../server'), | |
| connection = require('../database'); | |
| suite('Landing page functionality', function(){ | |
| setup(function (done) { | |
| this.timeout(5000); | |
| async.series([ |
This file contains hidden or 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
| <div class='large-text'>Form</div> | |
| <div class='text'> | |
| <form action="/form" method="post"> | |
| First name: <br> | |
| Last name: <br> | |
| </form> | |
| <div> | |
| {{#each results}} | |
| <div> | |
| {{this.user_name}} {{this.email}} {{this.fname}} {{this.lname}} |
This file contains hidden or 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
| connection.connect(function(err){ | |
| if(err){ | |
| console.log(err); | |
| } else { | |
| console.log('The node server is now connected to ' + connection.config.host + | |
| ' via user ' + connection.config.user +' to the database '+connection.config.database); | |
| } | |
| }); | |
This file contains hidden or 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 connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : '', | |
| password : ‘', | |
| database : ’’, | |
| port : 3306, | |
| }); |
This file contains hidden or 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 mysql = require('mysql'); |
This file contains hidden or 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
| exports.formprocess = function (req, res) { | |
| connection.query('INSERT INTO mocha_test_table VALUE'+ | |
| '("'+req.body.user_name+'","'+req.body.email+'","'+req.body.fname+'","'+req.body.lname+'");', | |
| function(err) { | |
| if(err){ | |
| console.log(err); | |
| } | |
| connection.query( | |
| 'SELECT * FROM mocha_test_table WHERE user_name="'+req.body.user_name+ | |
| '" AND email="'+req.body.email+'";',function(err,results){ |
NewerOlder