- Install Homebrew: http://brew.sh/
brew install mongodbsudo mkdir -p /data/db- then type in your passwordsudo chown $USER /data/db
mongod
brew install mongodbsudo mkdir -p /data/db - then type in your passwordsudo chown $USER /data/dbmongod| /* | |
| A quick and dirty monkey-patcher with undo. I made it for testing. | |
| Usage: | |
| var patcher = new MonkeyPatcher(); | |
| patcher.patch(Math, 'random', function() { | |
| return 0; | |
| }); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Absolute Position</title> | |
| <style> | |
| #box-1 { | |
| top: 0; | |
| left: 0; | |
| position: absolute; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>CSS</title> | |
| <link href="style.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <h1>CSS</h1> | |
| <p>CSS stands for Cascading Stylesheets, and is used to build web pages along with HTML and JavaScript.</p> |
| <script src="fib.js"></script> |
| function fibonacci(n) { | |
| if (n === 1) { | |
| return 1; | |
| } else if (n === 2) { | |
| return 1; | |
| } else { | |
| var n1 = fibonacci(n - 1); | |
| var n2 = fibonacci(n - 2); | |
| return n1 + n2; | |
| } |
| <script src="fib.js"></script> |