This file contains 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
const readline = require('readline'); // https://nodejs.org/api/readline.html | |
const fs = require('fs'); // The stream for readline will be from a file | |
// Create the object that will read from the stream | |
const readInterface = readline.createInterface({ | |
input: fs.createReadStream('./data2.txt'), // 🧐 Data filename goes here | |
// output: process.stdout, | |
console: false | |
}); |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[add your bin description]" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
</body> |
This file contains 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
// This one is from | |
// http://addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript | |
var addyRevealingModule = (function () { | |
var privateVar = "Joe Schmoe", | |
publicVar = "Howdy stranger!"; | |
function privateFunction() { | |
console.log( "Name:" + privateVar ); |
This file contains 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
## 1st problem: | |
Bundle install failed with message about Capybara not being able to install. | |
Had to use homebrew to install Qt. Take a look at: | |
https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit | |
## 2nd problem: postrgres |
This file contains 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
require 'spec_helper' | |
# require 'database_cleaner' | |
require 'capybara-webkit' | |
feature "Search" do | |
# before { visit about_path } | |
describe "Home page" do | |
it "should not have a searchbox" do | |
visit root_path |
This file contains 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
<h2>HTML Validation Project</h2> | |
<h3>for <a href="http://www.theodinproject.com/" target="_blank" >The Odin Project</a> frontpage.</h3> | |
<p>Recently the site went beta. And with that came some extra exposure and attention; an astute comment on Reddit pointed out that the source code had 2 DOCTYPE tags! *Embarrassing.*</p> | |
<p>Well, <a href="https://github.com/TheOdinProject/theodinproject/pull/36" target="_blank">that was fixed right quick</a>. But it brings up an issue... *how many other little bugaboo's are in the code?* Let's at least fix up the home page and see where that goes.</p> | |
<p>One of the tools in web dev's utility belt: **HTML Validation** : | |
it's like <a href="http://en.wikipedia.org/wiki/Lint_(software)" target="_blank">lint </a> for webpages.</p> |
This file contains 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
--> Focus on FUNCTIONS IN JAVACRIPT | |
### Using callbacks in JavaScript (how to pass functions as arguments to other functions) | |
function doSomethingCool() { | |
// | |
} | |
$('someElement').click( doSomethingCool ); |
This file contains 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
Getting THE ODIN PROJECT running on Nitrous.io | |
(with Postgresql, ...) | |
- Especially if you have a windows box, fugget-about-it!!! Just use Nitrous and you'll be well enabled. | |
- Step numbers below correspond to Eriks steps in 'Hacking on the Site Yourself' at: | |
https://github.com/TheOdinProject/theodinproject | |
Read those instructions at the same time for context. | |