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
| # !/bin/bash | |
| # A Bash script to download and install Nodejs updates | |
| init() { | |
| echo "Welcome to my simple script to install (from stable source) and update Node.js on Ubuntu distros." | |
| echo "'Cause that's a pain in the ass." | |
| echo "Yeah, yeah. Chris Lea's PPA would be even easier." | |
| echo "This just makes it easy to have a custom install. No muss. No fuss. Let's begin." | |
| helper_separator | |
| setup |
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
| describe('Luhn Formula Example', function () { | |
| // Final test at the top | |
| it('should validate IDs according to the Luhn formula', function () { | |
| expect(validateID('120488395')).to.be.ok(); | |
| }); | |
| // 1. Convert a string of numbers to an integer |
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 add (x, y) { | |
| return x + y; | |
| } |
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 expect = require("expect.js"); | |
| describe('A simple unit test', function () { | |
| it('should add two integers and return the sum', function () { | |
| // implementation to go here | |
| expect(add(3, 9)).to.be(12); | |
| expect(add('a', 8)).to.not.be.a('number'); | |
| expect(add.length).to.be(2); |
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
| * { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } |